You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find it convenient to declare my Views and Mat Views as Entities too. This allows ORM-based lookups and logical foreign keys against views to work seamlessly. However, if I set create_tables=True in generate_mapping, it attempts to create the Views as tables, and to create things like FK constraints against them, which leads to a DB error. It would be nice if we could flag an entity as a "non table" so it is exempt from some DDL, while still allowing it to behave as an entity. It would even be ok if we didn't try to stop the user from attempting to insert or update an entry as that would be a reasonable caveat, but at least it shouldn't prevent other entities from being created due to a DB exception on the views.
SqlAlchemy uses the __abstract__ directive for this purpose.
The text was updated successfully, but these errors were encountered:
I find it convenient to declare my Views and Mat Views as Entities too. This allows ORM-based lookups and logical foreign keys against views to work seamlessly. However, if I set
create_tables=True
ingenerate_mapping
, it attempts to create the Views as tables, and to create things like FK constraints against them, which leads to a DB error. It would be nice if we could flag an entity as a "non table" so it is exempt from some DDL, while still allowing it to behave as an entity. It would even be ok if we didn't try to stop the user from attempting to insert or update an entry as that would be a reasonable caveat, but at least it shouldn't prevent other entities from being created due to a DB exception on the views.SqlAlchemy uses the
__abstract__
directive for this purpose.The text was updated successfully, but these errors were encountered: