Good morning!
When i clone (or dup) an instance, the generated clone has the same primary
key instead of a new one.
*Example*:
user_1 = User.create
user_2 = user_1.clone # user_1.dup, same result.
Suppose user_1 has id 1. Then user_2 has also id 1, when i would expect it to
have id 2, as it is a new instance.
Maybe I am using this wrong.
Model
class User < Sequel::Model
Table
unless DB.table_exists?(:user)
DB.create_table(:user) do
primary_key :id
......
end
end
Maybe I am using this wrong.
Any help is really appreciated.
Thanks!
Ornella.
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.