#291 ✓resolved
AndrewO

[PATCH] Fixed association bug across repositories

Reported by AndrewO | May 18th, 2008 @ 07:56 PM

This is a patch to fix a bug that only occurs when two resources are associated across repositories. The problem was that the #{name}_association method that would look up Relations was using the repository of the model instead of the repository from the context when the association is initially set.

Comments and changes to this ticket

  • AndrewO

    AndrewO May 18th, 2008 @ 07:57 PM

    (BTW, I'd be open to refining the spec down a bit... It's a bit long and inelegant.)

  • AndrewO

    AndrewO May 19th, 2008 @ 11:00 AM

    Actually, I think this might be a better spec that uses some of the existing environment. Also, I changed the specs to test across namespaces as well as repositories (something else I'd been worrying about).

  • Sam Smoot

    Sam Smoot May 21st, 2008 @ 01:10 AM

    • Milestone cleared.

    Feel free to spec/push as discussed in #datamapper. Just to make it clear there's no pressure I'm setting the Milestone to 1.0.

    I have my doubts cross-repository associations are going to work for people not familiar with DM inner workings and the limitations you might run into with this.

    Feel free to prove me wrong. :-)

  • Sam Smoot

    Sam Smoot June 2nd, 2008 @ 04:07 PM

    • State changed from “new” to “resolved”

    Andrew,

    I believe the current version of DM works how you were requesting. I'm going to go ahead and close this out. I do hate to see good specs goto waste though, so feel free to push those up if you get the chance.

    Thanks, -Sam

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Pages