On 10/28/05 8:11 AM, Sean Davis wrote:
> Sorry.  Re-reading, I did imply that it wasn't possible.  What I meant was
> that one HAS to define the primary key explicitly

Well, unless the convention manager can find it, of course :)

> quite easy to do if there is such a primary key available (i.e., all rows
> actually HAVE a primary key that is definable).

If they don't, you can't use RDBO to front that table (view, whatever).
Recall the requirements from the docs:

    * The database server must be supported by Rose::DB.
    * The database table must have a primary key.
    * The primary key must not allow null values in any of its columns.

The final requirement may be relaxed one day, but the first two will not.

Well...technically, what you really "can't do" is load() and save()
individual objects.  I suppose you could define an RDBO class for the view,
plus a "fake" primary key (that you'll never use to do anything), then just
use RDBO::Manager to fetch multiple objects.  You might even be able to use
this view in a "... to many" relationship with other RDBO classes.  But
you'll never be able to load or save an individual row in the view if
there's no way to uniquely identify one (obviously).

Hm, so maybe a RDBO::View class that inherits form RDBO, relaxes the primary
key requirement, and then disables load() and save()?  I'm open to
suggestions...

-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

Reply via email to