[CDBI] might_have being fetched
[prev]
[thread]
[next]
[Date index for 2005/10/28]
By the way, if you read my last post about CDBI::Loader and db_Main,
how that popped up was I have might_have relationship on a table.
Music::CD->might_have( notes => 'Music::Notes' );
I thought notes would only be fetched if doing:
my $cd = Music::CD->retrieve( $id );
$cd->notes; # now do the select on Music::Notes
turns out an update causes a select on the might have table.
my $cd = Music::CD->retrieve( $id );
$cd->update; # causes a select on Music::Notes.
That update was causing Music::Notes->db_Main to be called, and since
it was the first time for that class connect_cached() get called and
reset AutoCommit.
Anyway, why does an update require a select on the might_have
relationship?
--
Bill Moseley
moseley@xxxx.xxx
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
[CDBI] might_have being fetched
Bill Moseley 03:41 on 28 Oct 2005
|