On 10/13/06 10:05 PM, Jonathan wrote: > On Oct 13, 2006, at 4:33 PM, John Siracusa wrote: >>> $a = A->new(id => 123); >>> $b = B->new(id => 123); >>> $a->b($b); > > that $a->b() part -- i didn't think rose could do that. the docs > didn't make it clear that you can just stuff a relationship object > into the namespace whenever. i thought it was read only.
Read-only? That wouldn't be very useful, would it :) All relationships have a "get_set_on_save" method created by default, which as the name implies is read/write. You can actually nest such things to an arbitrary depth and they'll all get saved in the order necessary to satisfy referential integrity (and within a single transaction, where supported) when the top-level parent object is save()d. -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