On 12/26/05 10:20 PM, Daniel Pittman wrote: > The error I get on trying to load the object is: > > Cannot create method FooParent::child - method already exists at > /usr/share/perl5/Rose/DB/Object/Metadata/MethodMaker.pm line 379 > [...] > If anyone can point me to where I have gone wrong, or even the general > area of where the error is caused, that would be great.
RDBO expects your key columns to be named like "foo_id" and your foreign keys and relationships to be named like "foo". Foreign keys and relationships have several methods created for them, one of which (by default) is named exactly like the relationship or foreign key name. Columns also (by default) have a method named exactly like the column name. So if you have a column named "foo" *and* a relationship for foreign key named "foo", one of those things won't be able to make its method(s). This is what's happening to you. You can override how methods are named, but it's less work to simply rename your database columns. (If you want to change how your methods are named, let me know and I'll post a longer example.) More information on RDBO's expected conventions can be found in the convention manager POD: http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/ConventionMana ger.pm#SUMMARY_OF_DEFAULT_CONVENTIONS -John ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object