On Tuesday, September 8, 2015 at 1:37:05 PM UTC+2, Richard Kuesters wrote:

| is your "A" class abstract and/or are you using them with polymorphism?

Thank you for taking time to look at this.
If by abstract you mean abstract as defined at 
http://docs.sqlalchemy.org/en/latest/orm/extensions/declarative/api.html?highlight=__abstract__#abstract
 
then no, it's not abstract. As to polymorphism the answer is not so simple. 
Basically using this example I tried to depict situation which I believe 
takes place in SQLAlchemy-Continuum extension. This extension for every 
model creates another one recording all changes to the original one. 
Original models are polymorphic (and use joined table inheritance) and 
create simple hierarchy Node -> Content -> Document which can be seen at 
https://github.com/Kotti/Kotti/blob/9a8684c10fbb3c6fbf6b1265c86b732e1c416c4a/kotti/resources.py
 
I'm not sure if models created by versioning extension (NodeVersion, 
ContentVersion and DocumentVersion) are meant to be polymorphic (supposedly 
as a consequence of original models being polymorphic) or not. Each of 
these models has "transaction_id" attribute mapped to "transaction_id" 
column in mapped table. The error is "sqlalchemy.exc.InvalidRequestError: 
Implicitly combining column contents_version.transaction_id with column 
nodes_version.transaction_id under attribute 'transaction_id'. Please 
configure one or more attributes for these same-named columns explicitly." 
By extending example from FAQ I wanted to understand under what 
circumstances could same-named columns be made to work.

Regards,
Piotr

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to