On 2/12/07, Graham Barr <[EMAIL PROTECTED]> wrote: > On Mon, February 12, 2007 9:48 am, John Siracusa wrote: >> On 2/11/07, Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote: >> RDBO uses the first unique key what has a defined value (evaluated in the >> order they were added to the metadata, IIRC). Since the default value for >> the email column is indeed defined (''), it is used. [...] > > Hm, so ->new is populating unspecified columns with default values and > then load is using those.
Well, no, not really. The accessor method is called within load() in order to determine if a column has a defined value. The accessor method then returns the default value if the actual value is undef. Nothing interesting related to this happens in new(). > Could the population of unspecified columns be delayed It sort of is (see above) depending on your definition of "delayed" and "populated." :) > or make it possible for ->load to determine that a column was not specified > but has been given the default value. What would load() do with that information? Disregard such column values? I know I've had classes where I *want* a default value to contribute to a unique key just the same as if it was set manually, so there's no obvious, single answer for what to do in that situation. Allowing a key name to be specified as a parameter to the load() call is a better idea, I think. (That'd require people to give their unique keys nice/sensible/memorable names, of course.) -John ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object