Hi,
I''ve followed the example given here:
http://ar.rubyonrails.com/classes/ActiveRecord/Base.html#M000367
and implemented set_sequence_name "seq_name" in my class. When I try
to
update the user table with a new row from:
http://localhost:3000/usertbl/new
I get the following error message:
RuntimeError: ERROR C23502 Mnull value in column "user_id" violates
not-null constraint FexecMain.c L1795 RExecConstraints: INSERT INTO
usertbl
What am I overlooking here?
--
Regards
Andrew
On 01/03/07, Andrew Madu
<andrewmadu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Hi,
> I have a sequence set up on one of my tables called seq_user_mytable. I
> tried the following with no joy:
>
> set_primary_key "user_id", :sequence =>
"seq_user_mytable" and:
>
> ActiveRecord:: Base.seq_user_mytable
>
> again with no joy. How do I implement a sequence in Rails/ActiveRecord?
>
> --
> Regards
>
> Andrew
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---