We have a few tables where we have multiple foreign keys that point
to the same table. For example
create table user_connections (
id int unsigned not null auto_increment primary key,
from_id int unsigned not null,
to_id int unsigned not null,
type enum('neighbor', 'friend', 'family'),
unique key (from_id, to_id),
key (to_id),
constraint foreign key (from_id) REFERENCES users(id),
constraint foreign key (to_id) REFERENCES users(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
The problem is that by default RDBO creates the metadata like
foreign_keys => [
user => {
class => 'MyClass::User',
key_columns => {
from_id => 'id',
to_id => 'id',
},
},
],
Which does not look right. It also does not match what is described
in the RDBO::Metadata pod under foreign_key_name_generator
Also, we are using ::Loader to generate our classes and I could not
figure out how to use our own FK name generator, or as the ::Metadata
pod suggests, intervene before initialize
Any pointers would be appreciated
Graham.
-------------------------------------------------------------------------
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