I have the feeling that id=0 is a bad idea since it can be that some
lib somewhere will use as trigger to generate an id.

if you can use id = 1 as root id then things should work fine for you

hope that helps a bit further ;-)

- Kristian

On Aug 20, 9:26 pm, Javier <[email protected]> wrote:
> I'm trying to do this (with mysql as db)
>
> irb(main):002:0> User.create(:id => 0, :name => "root", :code =>
> "code")
> => #<User @id=0 @code="code" @name="root">
> irb(main):003:0> User.all
> => [#<User @id=1 @code=<not loaded> @name=<not loaded>>]
>
> While this worked on sqlite, it doesn't work on mysql. As you see, the
> user object created has id=0, while the database shows id=1
>
> Using an external GUI, I can create a user with id=0.
> What am I doing wrong?
>
> thanks

-- 
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.

Reply via email to