(Sorry I've taken so long to reply to this, it fell through the cracks.)
On 9/18/06 7:47 AM, James Masters wrote:
> If I define a relationship from table1 to table2, do I also need to define
> the reverse relationship from table2 to table1?
No.
> I have changed my table names and field names to
OK, thank you very much.
In starting to do this, I've just done something similar to you - I put all
the pertinent code in a single file (but not all the package info (mainly
because I'm not sure how one can put all the package info in a single file))
and it works(!). I guess I've made some dumba
On 9/19/06, James Masters <[EMAIL PROTECTED]> wrote:
>> Why do you need to add the "booktype" releationship in your ::Extra
>> class if it's already there immediately after the make_classes() call?
>
> The post_init_hook that grabs the "Extra" relationship info seems to be
> creating the booktype r
> Why do you need to add the "booktype" releationship in your ::Extra
> class if it's already there immediately after the make_classes() call?
The post_init_hook that grabs the "Extra" relationship info seems to be
creating the booktype relationship (I thought correctly) in metainfo. The
make_cla
I put the code you sent earlier into a test script and ran it. It
appeared to work for me. I don't actually have any db tables, but it
generated the expected SQL:
# File: test.pl
[ all those class definitions you posted earlier ]
...
local $Rose::DB::Object::Manager::Debug = 1;
On 9/19/06, James Masters <[EMAIL PROTECTED]> wrote:
> package GARD::Book::Extra;
> GARD::Book->meta->add_relationships(
> booktype => {
> type => 'many to one',
> class => 'GARD::Booktype',
> column_map => { booktypecode => 'code' }
>
Or maybe someone can help me to help myself by letting me know how I can
list all the methods for a Class?
This ought to be easy too but I can't see it in my Perl Cookbook or anywhere
else either.
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Behalf Of James
Hello,
I'm hoping some kind person will be able to help me progress to get
relationships working as I've tussled with this problem for quite some time.
I've set up 2 tables to test with. I've tried to keep it simple and renamed
everything to adhere to default conventions as given in the docs. So