Hi John (and everyone),

I just figured out why I wasn't getting an automatically generated
add_ method in one of my classes.  It turned out that Loader wasn't
generating the appropriate relationship.

Long story short, I had a table named "set", and another named
"set_member", one set can have many set_members.  Using ->make_modules
instead of ->make_classes showed that their was no relationship being
set up, although it was setting up a one-to-many relationship between
another table (pair) and set_member.

When I changed the table names (and foreign key ref's, etc...) to
"gset" and "gset_member" everything worked as it seemed it was
supposed to be.

I'm using postgresql 8.1 as my db.

I've attached a tarball with a test case.  

To see it work, create a table named "simple" and initialize it from
moose.sql.  Then run make, then run "perl -Iblib/lib blib/script/moose". 

To see the failure, change all the references to "gset" in the schema
and script/moose to "set", recreate the database, and rerun
script/moose.

There's probably a very good reason not to name a table "set" (xemacs'
sql mode even highlights it as a keyword...), but maybe a warning is
in order?

Thanks,

g.

Attachment: rose-simple-test.tgz
Description: simple test case

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to