check for an _instance_key attribute.

On Feb 12, 1:52 pm, "Matt Culbreth" <[EMAIL PROTECTED]> wrote:
> Hello Friends,
>
> I'm working with the latest version of SQLAlchemy now and I have a
> question: how do I determine if a particular mapped object instance
> has been populated by the database?
>
> The question originates because I have defined a __repr__() method on
> one of my mapped objects.  It works fine if the object has been
> loaded, but throws a "TypeError" exception until that time because one
> of the statements in the __repr__() method is using an 'int' type.
>
> I can easily handle this by checking for None of course, but is there
> a more standard way people use the tool?
>
> Thanks,
>
> Matt


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to