Re: [RDBO] Multiple foreign keys to the same table

2006-10-25 Thread John Siracusa
On 10/25/06, John Siracusa <[EMAIL PROTECTED]> wrote: > Still working, but I think I'm in the home stretch... :) Okay, it's documented and in SVN. All tests seem to pass. Let me know how it works for you. -John - Using Tom

Re: [RDBO] Multiple foreign keys to the same table

2006-10-25 Thread John Siracusa
On 10/25/06, John Siracusa <[EMAIL PROTECTED]> wrote: > Here's what it looks like after I've removed > foreign_key_name_generator() and fixed the MySQL 5.0.6+ bug [...] As usual, it's more complex than I'd originally thought. I think I'll have to keep foreign_key_name_generator(), but I'll clarif

Re: [RDBO] Multiple foreign keys to the same table

2006-10-25 Thread John Siracusa
On 10/24/06, Graham Barr <[EMAIL PROTECTED]> wrote: > 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, >typeenum('neighbor', 'friend', 'family'), >unique key (from_id,

Re: [RDBO] Multiple foreign keys to the same table

2006-10-25 Thread Graham Barr
John Siracusa wrote: > On 10/24/06 11:45 PM, Graham Barr wrote: > > The problem is that by default RDBO creates the metadata like > > > >foreign_keys => [ > > user => { > >class => 'MyClass::User', > >key_columns => { > > from_id => 'id', > > to_id

Re: [RDBO] Multiple foreign keys to the same table

2006-10-24 Thread John Siracusa
On 10/24/06 11:45 PM, Graham Barr wrote: > 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', >}, > }, >]