For the following example I'm using postgresql 8.0 and I have a custom
convention manager:
Given the following tables:
CREATE TABLE person
(
id INTEGER NOT NULL DEFAULT,
name CHAR(100) NOT NULL,
email CHAR(100) NOT NULL,
title CHAR(100) NULL
);
CREATE TABLE phone
(
id INTEGER NOT NULL DEFAULT,
number CHAR(100) NOT NULL,
);
CREATE TABLE person_phone_map
(
person_id INTEGER NOT NULL,
phone_id INTEGER NOT NULL
);
ALTER TABLE person_phone_map
ADD CONSTRAINT pkperson_phone_map
PRIMARY KEY (person_id, phone_id);
ALTER TABLE person_phone_map ADD CONSTRAINT fk_person_phone_person
FOREIGN KEY (person_id) REFERENCES person (id) ON DELETE CASCADE;
ALTER TABLE person_phone_map ADD CONSTRAINT fk_person_phone_phone
FOREIGN KEY (phone_id) REFERENCES phone (id) ON DELETE CASCADE;
package LF::DB::ConventionManager;
use base 'Rose::DB::Object::ConventionManager';
sub plural_to_singular { $_[1] }
sub singular_to_plural { $_[1] }
1;
When I make_classes() the MAPCLASS LF::DB::PersonPhoneMap gets the "phone"
and "person" methods and when it comes time to define the Person and Phone
classes there is a method conflict according to
auto_relationship_name_many_to_many and they get the phone_objs and
person_objs method names.
Now I'll never need to use the MAPCLASS directly so I would prefer if
it got the
uglier methodnames.
How can I (ab)use the convention manager to treat MAPCLASSES as
second class citizens in this regard?
--
Clayton Scott
[EMAIL PROTECTED]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object