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 clarify when it's
called (i.e., only if the CM fails or declines to generate a name).
I've also had to make the CM's auto_foreign_key_name() method behave a
bit more like foreign_key_name_generator() in order to make the test
suite continue to pass.  On the bright side, the example you sent now
looks like this:

My::UserConnection:

    foreign_keys => [
      from => {
        class       => 'Mysql::User',
        key_columns => { from_id => 'id' },
      },

      to => {
        class       => 'Mysql::User',
        key_columns => { to_id => 'id' },
      },
    ],

My::User:

    relationships => [
      froms => {
        column_map    => { to_id => 'id' },
        foreign_class => 'Mysql::User',
        map_class     => 'Mysql::UserConnection',
        map_from      => 'to',
        map_to        => 'from',
        type          => 'many to many',
      },

      tos => {
        column_map    => { from_id => 'id' },
        foreign_class => 'Mysql::User',
        map_class     => 'Mysql::UserConnection',
        map_from      => 'from',
        map_to        => 'to',
        type          => 'many to many',
      },
    ],

Still working, but I think I'm in the home stretch... :)

-John

-------------------------------------------------------------------------
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
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to