On 10/28/05 6:31 AM, Sean Davis wrote: > On 10/27/05 4:34 PM, "John Siracusa" <[EMAIL PROTECTED]> wrote: >> On 10/27/05, Sean Davis <[EMAIL PROTECTED]> wrote: >>> Is there support for views in RDBO (as in views in the database acting as >>> tables, not as in "fake" views done in perl)? I don't see any and was just >>> curious if I was missing something. >> >> There's no explicit support, but you should be able to just enter the >> view name as the table name and then treat it like any other RDBO >> class. You may get an error if you try to save() and you're not using >> an updatable view, of course. > > The one detail that is still required is a primary key for the view which > can't be defined within the database (at least in Pg and MySQL, I > think)--this is an obvious point, but escaped me until I tried it.
Well if it's not in the database, then auto_initialize() can't be expected to find it. The convention manager might be able to help if the primary key is a single column that's named according to its convention. Failing that, you could either define your own custom convention manager to help you, or you just have to define the primary key manually, the "old fashioned way" __PACKAGE__->meta->primary_key_columns(...); -John ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object