Looks like it is due to UUID... I've updated my Gist to reflect the test. On Jun 23, 10:11 am, Bryan Richardson <[email protected]> wrote: > You bring up a good point actually. I'll try isolating the problem to > UUIDs by first testing the code with a regular (Serial) id property... > > On Jun 23, 7:36 am, Richard Conroy <[email protected]> wrote: > > > > > On Wed, Jun 23, 2010 at 1:56 PM, Bryan Richardson <[email protected]> wrote: > > > Hi Richard, > > > > Thanks for responding, I really appreciate it. > > > > Surrounding the sim.create calls with a rescue block does nothing - no > > > exceptions are raised. So, rather than creating instances, I tried > > > initializing them, setting 'raise_on_save_failure' to false, then > > > saving them, but as expected the exception raised just states that > > > sim.save returned false and the model was not saved. > > > > Models only have the 'errors' method when dm-validations is used, and > > > since I'm not doing any validating, no errors exist on the model when > > > I do require dm-validations. > > > And they would only give you error messages with respect to validations > > failures. > > > > I'm assuming I have all the DM dependencies I need required, otherwise > > > I'd get an error saying something about uninitialized constants or > > > similar messages. > > > Hmm, I have had odd problems when I mixed and matched dm-foo gems > > with different versions inappropriately. (On Heroku, my own stupid fault) > > > > I could not find the conversation on Ruby Talk that you mentioned... : > > > ( > > > It may not have solved the problem anyway. I would be more inclined to > > search through delicious.com and find links tagged with uuid & datamapper > > > > I've updated my Gist athttps://gist.github.com/0a77160612394a0ecc67 > > > with the changes I made (along with logging output) if you want to > > > peek at it again... you should even be able to execute the code if you > > > have a Postgres DB setup. Something is keeping the model from being > > > written to the database for some reason, and I just don't know how to > > > figure out what that reason is... :( > > > And you should be getting some kind of exception, or significant log output. > > > This came up on the list alright. DataMapper can be pretty silent when you > > have > > odd errors. > > > The only thing I would change/hackabout with is: > > remove :system => system from the constructor args list, > > and replace it with: > > sim.system = system > > sim.save > > > My DM-fu isn't good enough, and the API should be handling that, > > but I still get a lot of my progress from trial and error. I would be > > racing to get proper debug output at this stage, trying to isolate > > the problem. > > > Sorry I can't help more. > > > --http://richardconroy.blogspot.com
-- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
