search for: set_sequence_nam

Displaying 13 results from an estimated 13 matches for "set_sequence_nam".

Did you mean: set_sequence_name
2007 Jan 08
1
Anybody know how works -> set_sequence_name?
Hi, anybody know how to work with set_sequence_name?, any example?? thanks, Alfredo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-ta...
2010 Sep 27
0
problem with set_sequence_name please help
I''m building rails 3 with legacy oracle 10g db. which it''s sequence is non rails convension. I have try this. class AdCourt < ActiveRecord::Base set_sequence_name ''COURT_SEQ'' end with rails console : AdCourt.sequence_name I have got "COURT_SEQ" which look ok. When AdCourt.create!(:caption => ''AAAA'', :code => ''1111'', :version => 0, :created_by_id => 0) it''s still using...
2007 Jan 23
7
ActiveRecord requires sequence numbers in Oracle join table
I am mapping ActiveRecord classes to an existing Oracle database. This means I cannot change the database schema to fit ActiveRecord conventions. Predictably, I have gotten into trouble: I have several join tables that do not have a primary key column, and therefore no number sequence defined. ActiveRecord insists on requiring a sequence, and gets unhappy when there is none to find. Is there a
2006 Mar 01
7
Oracle Sequence & Rails
the compiler tell me it: invalid column name: INSERT INTO ago.prova_stats (cognome, nome, id, telefono) VALUES(''Medda'', ''Ivan'', :id, 70565611) where ago.prova_stats is the table used by me and that have only the columns ''cognome'',''nome'' and ''telefono''. My table hasn''t the column
2006 Feb 28
3
[AR] #{id} namespace visibility used in finder_sql
...d some AR constructs. They are based on a finder_sql doing some dirty sql and using #{id} from the ''pivot'' model for extracting data in other tables. like : class Division < ActiveRecord::Base set_table_name "legacy_division" set_primary_key "divid" set_sequence_name "SQ1_DIV" has_many :members, :class_name => ''Division'', # Result is not really a Division class # but that works.. :finder_sql => ''select u.userid, u.u...
2013 Feb 10
0
Nested attributes doesnt get updated
...} else format.html { render action: "edit" } format.json { render json: @a_w_request.errors, status: :unprocessable_entity } end end end *Models:* *a_w_request.rb* class AWRequest < ActiveRecord::Base set_primary_key :request_id set_sequence_name "w_request_details_seq" set_table_name "w_request_details" attr_accessible :requester_contact, :needed_by, :w_a_details_attributes has_many :w_a_details, :dependent => :destroy accepts_nested_attributes_for :w_a_details, :allow_destroy => :true, :reject_if...
2007 Mar 01
1
PostgreSQL primary (sequence) key issue
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
2007 Jun 19
2
sequence name prefix
...end I assumed that the sequence names were also prefixed with the database schema names, e.g. keywords.things_id_seq But Rails 1.2.3 assumes the sequence is *NOT* in the same schema as the tables, and prefixes them with ''public.'' :-( I have to declare in *ALL* my classes: set_sequence_name "keywords.things_id_seq" This is awful in terms of maintenance. So I would be very grateful if I could find an equivalent of: ActiveRecord::Base.sequence_name_prefix = "keywords." (this fails: undefined method `sequence_name_prefix='' for ActiveRecord::Base:Class)...
2011 May 11
2
Issue with Arel::SelectManager and insert Method
Hello, Arel::SelectManager (arel 2.0.9) uses following statement to insert a new record: @engine.connection.insert im.to_sql, ''AREL'', primary_key_name, primary_key_value But in DatabaseStatements insert ist defined as: insert(sql, name = nil, pk = nil, id_value = nil, sequence_name = nil) Actually, Arel::SelectManager does not use the sequence name. This leads to issues
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde
2006 Jan 04
3
Legacy Table works-except edit?
Greetings, I''m trying to put a Rails face on a Legacy Oracle 10 table. I am currently setting the table_name and primary_key, and I get the list and show to work fine. However, when I hit edit I just get the Editing <table name>, Edit button, Show, and Back. None of the fields are rendered. Why would I be able to show these fields in the show and list, but not edit them in the
2006 Jun 24
5
Why is rails using DB objects that don''t exist?
I admit it--I''m newb right now. But only to rails, ruby and friends. I''m walking through a "recipe" tutorial but have been stuck for hours; it''s time to ask for help. On Windows I''ve got the latest ruby, rails, and webrick; I''ve got the Oracle OCI "thing" to talk to our Oracle 10g database, I''ve got Slick Edit and a
2006 Jul 20
4
Help with Rails and postgres with sequence numbers (global?)
Hello, I am building an Rails applications that has to integrate an legacy system (lxoffice) (schema at: http://www.lx-office.org/uploads/media/DB_Schema_2.1.1_R_393_17_03_2005_.pdf). They somehow use global ids (global for some tables). I can not change the schema and still I want to use Rails to access it and not pure SQL. When I try to insert a record I get the following message: