Hello, I had to change a relationship from a simple ID to ID relationship to one that also includes a second ID. Worse still the second ID is not a column in one of the relationship partners but has to be taken from a record two steps up the hierarchy. Perhaps I will change the table to include the ID directly but for the time beiing this is what I tried:
package PVonline::Behandlungen; [...] __PACKAGE__->meta->relationships( # way to get a praxis_id? rezept => { type => 'many to one', class => 'PVonline::Rezepte', column_map => { rezept_id => 'nr' }, }, leistung => { type => 'many to one', class => 'PVonline::Leistungspreise', column_map => { leistung_id => 'positionsnr', # doesn't work: 'rezept.patient.praxis_id' => 'praxis_id', }, }, # ... and some more ... ); I get an error message that 'rezept.patient.praxis_id' is not a column. Is this possible? What if I change the table to include a column praxis_id? I have a add_unique_key(['positionsnr', 'praxis_id']) in PVonline::Leistungspreise, to make sure it really is a many to _one_ relationship. Thanks, Michael ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object