On 5/21/07, James Masters <[EMAIL PROTECTED]> wrote: > foreach my $relobj (@relationships) { > my $type = $relobj->type; > my $relname = $relobj->name; > next unless ($type eq 'many to one' or $type eq 'one to one'); > my $egsubobj = $egobj->$relname; > > This code works fine for other classes but for one class when I do the > $egobj->$relname line, it fails with > > "Could not load MG::Country with key "
That indicates to me that you have a relationship or foreign key pointing from some class to MG::Country, and that that relationship or foreign key definition lacks a column_map or key_columns attribute. What is the class of $egobj and what is $relname when that call fails? Can you post the class definition for the class of $egobj? -John ------------------------------------------------------------------------- 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