maybe somehow make it pseudo-composite using some "hardcoded" 
db-identifier as discriminator..

here Mike's reply from some days ago on a related question:

> [sqlalchemy] Re: table without any primary_keys?
> From: Michael Bayer <[EMAIL PROTECTED]>
> To: sqlalchemy@googlegroups.com
> Date: 2008-05-18 06:54
>
> On May 17, 2008, at 9:52 PM, [EMAIL PROTECTED] wrote:
> > seems such thing is disallowed, or at least Mapper complains.
> > is it SQL requirement or what?
>
> the mapper needs some set of PK columns defined for mapped classes
> so that it can identify objects.  they dont need to be actual PK
> columns in the database.
>
> in theory there just needs to be a function that can extract a
> primary key from a row - it doesnt even necessarily have to be "use
> these columns".  though such a feature would require some API
> changes.

HTH
svil

On Thursday 22 May 2008 14:10:38 Geoff wrote:
> Hi,
>
> I have split up my database  horizontally and am using UUIDs to
> uniquely identify a row across databases. Using UUIDs as a primary
> key is slow (InnoDB) so I wanted to use the common trick of having
> a INT primary key using auto_increment on each database. This is
> all fine, until sqlalchemy checks its cache of objects after a
> query to see if the object has already been retrieved. This breaks
> because the primary key is not unique across databases when I use
> an auto_incremented INT.
>
> I reckon the solution is going to have to be manually setting the
> field used by sqlalchemy to make the cache decision. Is there any
> way of doing this already, or am I going to have to put it in
> myself?
>
> Thanks!
> 


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