Hi,
I'm trying to figure out how to have an object return its primary key without knowing what it is called. The docs in http://www.sqlalchemy.org/docs/05/sqlalchemy_orm_mapper.html look relevant, for example the function identity_key_from_instance (see entry from docs below), but I'm not clear about usage. The functions on this page look like they are meant to be used as method functions of a mapper object, but how should I construct such a mapper object? In my schema file, I have lines like Mapper(Foo, foo_table) should I be returning an mapper object for use with functions? Ie should I be doing foo_mapper = Mapper(Foo, foo_table) or similar? The section module sqlalchemy.orm.mapper saya "This is a semi-private module; the main configurational API of the ORM is available in module sqlalchemy.orm." Does this mean it is not meant to be used in this fashion? Also, I don't understand what is meant by "This value is typically also found on the instance state under the attribute name key." in the docs for identity_key_from_instance below. Please CC me on any reply. Thanks and regards, Faheem. ************************************************************************ def identity_key_from_instance(self, instance) Return the identity key for the given instance, based on its primary key attributes. This value is typically also found on the instance state under the attribute name key. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---