On 1/31/06, Michael Bayer <[EMAIL PROTECTED]> wrote:
> m = mapper(myclass, table, primary_key=[table.c.asn, table.c.type])
>
> Which just tells the mapper what cols make up the primary key.

Thanks for the response. Unfortunately, I don't completely understand
the implications of 'make up the primary key'.

What are the limitations on primary keys? Do primary keys need to be
immutable? Does the primary key (explicit or composite) need to have a
1:1 mapping onto rows or can the pk map to multiple rows? If the
latter is the case, how are updates handled?

I'd guess that result rows are directly turned into mapped class
instances, but updates and deletes would apply to all rows addressed
by the pk. I should probably figure this out by looking at code, but
clarification would be appreciated.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to