I can run other DM code that isn't running in merb, so I'm sure I've
got all I need to run DM 0.10RC1
> It also might be a good idea to install everything directly from the
> github repos and keep them uptodate
> regularly. If you're willing to use RC1 (out of probably 4-5) maybe
> you're fine with edge too?
I git cloned your Merb, diff'd the merb_datamapper and made the non-
Action ORM changes to my local merb_datamapper and my test sqlite3 app
now works. I _think_ that's down to the changes to the automigration
using DataMapper.auto_migrate! directly.
With the test app working, I went back to my main development app and
discovered that I had :nullable => false in my migrations against
the :id keys, thus:
:id, Serial, :nullable => false
Now, I'm not sure if that is needed or not - obviously you don't want
null ids, so presumably they're not NULL by default? Anyway,
removing :nullable => false fixed the INSERT errors that I was seeing
when creating records. I've now moved on to another set of errors with
'cannot modify frozen object' and/or 'stack level too deep'.
I'll try and come back to this later to review further.
>>> cheers
>>> snusnu
Thanks for the help thus far.
Andy
> It's definitely a good idea to have a look at the tickets!
I'm really eager to get Merb working with 0.10rc1, if not only for the
fact it now saves parents before self and children. Thanks to my
housemate buying 3 bottles of cheap wine, I'm on a drunken ticket
reporting spree. Anything to be logged here? =)
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net/
http://twitter.com/ashleymoran
>> I git cloned your Merb, diff'd the merb_datamapper and made the non-
>> Action ORM changes to my local merb_datamapper and my test sqlite3
>> app
>> now works. I _think_ that's down to the changes to the automigration
>> using DataMapper.auto_migrate! directly.
>>
>> With the test app working, I went back to my main development app and
>> discovered that I had :nullable => false in my migrations against
>> the :id keys, thus:
>>
>> :id, Serial, :nullable => false
>>
>> Now, I'm not sure if that is needed or not - obviously you don't want
>> null ids, so presumably they're not NULL by default?
>
> Yes, they are not null by default, :id, Serial should be enough
I've reviewed this further and :id, Serial isn't actually enough with
0.10RC1 - that's because with Postgres (and maybe others) it doesn't
actually create a Serial column if you're using rake db:migrate, as
apposed to Datamapper.automigrate!
> It's definitely a good idea to have a look at the tickets!
It is! Here's one created regarding this very matter - http://datamapper.lighthouseapp.com/projects/20609/tickets/938-datamapper-010-does-not-make-serial-properties-serial-in-postgresql-using-dm-migrations
With that done, I was able to make more progress with a 'standard'
merb_datamapper. I'm not 100% there yet, however, so I'll let you know
what other changes I had to make, if any.
Andy
> It is! Here's one created regarding this very matter -http://datamapper.lighthouseapp.com/projects/20609/tickets/938-datamapper-010-does-not-make-serial-properties-serial-in-postgresql-using-dm-migrations
Which Andy was incremental in isolating ;o)