Thanks, John. Well it does point to it being my error but I just can't see it:- perhaps I have a syntax error that's staring me in the face. If I catch the error, the output is as follows:
Error attempting to get relationship named countryname of type "one to one"
from object class MG::Countrygroup and uid: 66. Error was:
"Could not load MG::Country with key "
So the Class is MG::Countrygroup. Perhaps my "address" comment was a red
herring because countryname is the relationship and I attach the file that
contains this definition and also the file containing the MG::Country
definition.
If you can't see the problem, can you suggest how I can try to debug
further? Is there any debug thing I can turn on in Rose to see what is
happening? Or a perl thing, not a Rose thing but how can I simply show all
the function calls and their arguments.?
thanks,
James.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of John
> Siracusa
> Sent: 21 May 2007 19:59
> To: Rose::DB::Object list
> Subject: Re: [RDBO] make methods error
>
>
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rose-db-object
>
Countrygroup.pm
Description: Binary data
Country.pm
Description: Binary data
------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/rose-db-object
