[CDBI] Join problem
emorozov at intermedia.net
Tue Dec 5 19:14:13 GMT 2006
I've just started using Class::DBI and immediately hit a problem. Suppose, I have two tables:
create table domains (
contact_id integer foreign key references contacts(id),
admin_id integer foreign key references contacts(id)
create table contacts (
And I've defined class Domain as:
All => qw/name created
contact_id => 'Contact',
admin_id => 'Contact'
The problem is that objects returned by Domain->search will returns correct contact_id object but admin_id is always empty.
I guess that generated sql is incorrect, but I don't understand how hand-written sql code for set_sql method should look in this case.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ClassDBI