Comments (5)
@pekof Thanks for letting me know. Take a look at the response in #16 to see if that solves the problem.
from flask-sqlacodegen.
@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.
@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.
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.
Great. Thanks for letting me know. Hope to push out a fix this week.
from flask-sqlacodegen.
Related Issues (20)
- Missing s in table name HOT 1
- --noclasses is ignored. HOT 2
- Execution crashes (unsupported operand type(s) for +: 'NoneType' and 'unicode') HOT 2
- TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' HOT 5
- Option to db.Float(11, False) or db.Float(11, True) HOT 1
- Wrong import generated view class
- console command writing models as type bytes HOT 1
- Add support for SET column type [wishlist] HOT 2
- Can I use this library such as `pytest.main()`? HOT 1
- SQLite3 does not generate classes,(python 3.8.1 sqlite 3.2.5) HOT 2
- Don't generate Classe for postgresql HOT 1
- --nocomments not work
- Update releases HOT 1
- The data table name is inconsistent with the generated class name HOT 1
- Wrong code generated for timestamp, tinyint and boolean datatypes HOT 1
- AttributeError: module 'sqlalchemy' has no attribute '__all__'. Did you mean: '__file__'? HOT 3
- Rename --ignorefk as name and function do not match HOT 1
- I'm getting this error (KeyError: 0), any clue? HOT 8
- Only model generation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-sqlacodegen.