On 05/06/2013 13:46, sajuptpm wrote:
Hi,
I also tried like this, But not working

instance_of_B.__mapper_args__["polymorphic_identity"] = "type_c"
DBSession.add(instance_of_B)
transaction.commit();

and

instance_of_B.__mapper__.polymorphic_identity = "type_c"
DBSession.add(instance_of_B)
transaction.commit();


You should not modify polymorphic_identity directly:

http://docs.sqlalchemy.org/en/rel_0_8/orm/mapper_config.html?highlight=polymorphic_identity#sqlalchemy.orm.mapper.Mapper.polymorphic_identity

"This is a /read only/ attribute determined during mapper construction. Behavior is undefined if directly modified."


Thanks,
--
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.

--
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to