[CDBI] Bad things will happen
[prev]
[thread]
[next]
[Date index for 2005/09/13]
If you try to use a has_many relationship with a class that has a
multi-column primary key - bad things will happen.
:)
Specifically, in Class::DBI::Relationship::HasMany
59 return (
60 before_delete => sub {
61:
$self->foreign_class->search($self->args->{foreign_key} => shift->id)
62 ->delete_all;
63: });
Terrible things will happen if shift->id returns an array.
I don't think this particular one is in the docs.
Hey... I had fun anyway. (Yes, I know I deserved it.)
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
 |
[CDBI] Bad things will happen
Kate Yoak 06:39 on 13 Sep 2005
|