On 5/30/07 2:31 AM, David Lloyd wrote:
> Interestingly, it seems that Rose::DB::Object will attempt to make the
> first field that it can lexically see in the meta hash the primary key
> IF no primary key is given.

Correct.  I think that's documented somewhere, but I can't find it...

> Furthermore, the manager I have the class automatically create still works for
> what I want to do even though the primary key is not at all uniquer.

The Manager uses the PK to know how to attach related objects when you use
the require_objects or with_objects arguments.  Furthermore, calling load(),
save(), or delete() on an object with a "fake" (or otherwise inaccurate)
primary key may cause strange/harmful things to happen, such has deleting
many rows at once.

-John



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to