#639 ✓not-applicable
kristian

[PATCH] working with none default repository requires a default anyways

Reported by kristian | November 5th, 2008 @ 01:52 PM

having a only a named repository does result in an error message Adapter not set: default. Did you forget to setup?

everything works until I create objects in associations or assign them to one.

uncomment either line in the code here http://pastie.org/308154 and you can reproduce the error message.

adding


DataMapper.setup(:default, 'sqlite3::memory:')
DataMapper.auto_migrate!

helps to "remove" the error message.

so illustrate the effects even more another example. http://pastie.org/308163 here the 'user' in the database remains the same after the first save, and the user in memory does follow all the changes.

but commenting in the one line which loads the user fresh before working with it, does "synchronize" the behavior.

Comments and changes to this ticket

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

Tags

Pages