I have essentially an inherited table...
Class A
col 1
col 2
col 3
Class B
col 11 PRIMARY KEY REFERENCES col 1
col 12
col 13
Rose has them in a 1:1 relationship
Loading is fine
Right now I have this:
$classAB= Rose::DB::Object::Manager-get_objects(
object_class= A
with_objects= ['B'],
query= [
id= $kw_args{'id'} ,
On 10/13/06, Jonathan Vanasco [EMAIL PROTECTED] wrote:
Right now I have this:
$classAB= Rose::DB::Object::Manager-get_objects(
object_class= A
with_objects= ['B'],
query= [
On Oct 13, 2006, at 4:09 PM, John Siracusa wrote:
Then why not just do this:
$a = A-new(id = 123);
$b = B-new(id = 123);
$a-b($b);
$a-save; # save A and its associated B
That's actually exactly what I wanted.
I couldn't figure out if rose supported that or not.
On 10/13/06, Jonathan Vanasco [EMAIL PROTECTED] wrote:
On Oct 13, 2006, at 4:09 PM, John Siracusa wrote:
Then why not just do this:
$a = A-new(id = 123);
$b = B-new(id = 123);
$a-b($b);
$a-save; # save A and its associated B
That's actually exactly what I wanted.
I
On Oct 13, 2006, at 4:33 PM, John Siracusa wrote:
It does :) Read up on the get_set_on_save variants of the methods
created for the various relationship types. In this case, a
one-to-one relationship, the default automatically created method
types:
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