The application that I am working on uses myapp_create.pl to create the
model from the database schema.

The problem is that the DBIx::Schema::Loader is creating a relationship with
a name that is inappropriate, and conflicts with a relationship that I've
manually created.

In this case, there is a table of "group", "employee" and a third table
"employee_group" that links employees to groups. The group table has a
"leader" field that references an employee who is the group leader. DBIC has
decided to create a relationship on players called "groups" that basically
says what groups the employee is the leader of.  Not a very good name, and
of course conflicts with the "groups" relationship that I created, that
indicates what groups an employee is actually in. (Yes, there is an
"employee_groups" relation, but I added the "groups" relation to bridge that
indirection.)

Looking at the documentation for DBIx::Schema::Loader, there is an option
called rel_collision_map that can supposedly be used to fix this. I'm unsure
how it works, and even less sure how to pass a hash as an option to the
myapp_create.pl script.

If that option is supported, examples would be helpful.

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to