On May 2, 2007, at 7:39 AM, Graham Stratton wrote:

>
> Hi,
>
> Now I've set the maximum identifier length to 30 chars (thanks!), I
> have a new problem.  My Person class inherits from PersonEntry, and
> the get() method on Person now fails when passed a single id.  This
> seems to be due to the removal of the workaround for #185 in
> orm.query.Query._get

if your primary key is defined across multiple keys then get()  
requires multiple keys.   to specify whatever primary key you want,  
use the primary_key option on mapper().

>
> I have another example where inheritance works fine.  It seems to fail
> in this instance because the table that PersonEntry is mapped to is an
> alias.  Should it be possible to set up inheritance from an aliased
> table?  It worked in 0.3.6, and the inheritance still works apart from
> get() in 0.3.7.

thats probably the source of your issue, use primary_key to be  
explicit, else send a fully working example if youd like the  
community to help figure it out.




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