Git Product home page Git Product logo

Comments (5)

ksindi avatar ksindi commented on August 30, 2024

@pekof Thanks for letting me know. Take a look at the response in #16 to see if that solves the problem.

from flask-sqlacodegen.

ksindi avatar ksindi commented on August 30, 2024

@pekof I think the fix would be:

self.kwargs['secondary'] = repr(prefix + assocation_table.name) if assocation_table.name is not None else repr(assocation_table.name)

Can you see if that works?

from flask-sqlacodegen.

pekof avatar pekof commented on August 30, 2024

@ksindi I tried that and got NameError: name 'prefix' is not defined
Then I replaced line with
self.kwargs['secondary'] = repr(assocation_table.schema + assocation_table.name) if assocation_table.schema is not None else repr(assocation_table.name)
and now it generated model.
Thank you for idea

from flask-sqlacodegen.

pekof avatar pekof commented on August 30, 2024

Generated model had some issues but it was solvable by replacing db.UNIQUEIDENTIFIER with UNIQUEIDENTIFIER and db.BIT with BIT in generated code.

Identifiers were imported from sqlalchemy.dialects.mssql.base
from sqlalchemy.dialects.mssql.base import BIT, UNIQUEIDENTIFIER allready

from flask-sqlacodegen.

ksindi avatar ksindi commented on August 30, 2024

Great. Thanks for letting me know. Hope to push out a fix this week.

from flask-sqlacodegen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.