similar to: ActiveRecord: FK constraints problem

Displaying 17 results from an estimated 17 matches similar to: "ActiveRecord: FK constraints problem"

2007 Jun 09
0
Branch 'as' - libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie_as.c
libswfdec/swfdec_flv_decoder.c | 2 +- libswfdec/swfdec_movie.c | 11 +++++++---- libswfdec/swfdec_movie.h | 4 +++- libswfdec/swfdec_sprite_movie_as.c | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) New commits: diff-tree d3ff93817f2931e6f6e9bb8400fe807c92e8f414 (from a84be08c2e1e412e3f1d7d485458dafc661411d1) Author: Benjamin Otte <otte at
2006 Apr 20
4
ActiveRecord: Many-to-Many problem
I am trying to make many-to-may relationship on classes Section and Content. Both Content and Section has: has_and_belongs_to_many :contents and has_and_belongs_to_many :sections and I have an exception when trying to access model properties: "undefined method `add_contents'' for #<Section:0xb745c514>" def add_content_entry @section = Section.find(params[:section_id])
2007 Jun 13
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_movie_asprops.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_sprite.c
libswfdec/swfdec_as_array.c | 34 +++ libswfdec/swfdec_button_movie.c | 2 libswfdec/swfdec_morph_movie.c | 6 libswfdec/swfdec_movie.c | 314 ++++++++++++++---------------- libswfdec/swfdec_movie.h | 41 ++- libswfdec/swfdec_movie_asprops.c | 16 - libswfdec/swfdec_player.c | 13 -
2006 May 26
0
has_and_belongs_to_many with fk constraints?
Hi folks, I''m wondering if it''s possible to use foreign key constraints on the join tables of a has_and_belongs_to_many relation. Specifically, I get this error when I try and delete a model I''m using, named saved_search, which is many-to-many with neighborhoods. Any ideas? Thanks for any help. :-) -Eric Code: @saved_search.destroy Error: Mupdate or delete on
2006 Jan 10
0
bug? : STI and :include => fk and class_name MUST be specified
I suspect this is a bug. Or a limitation. Problem: ---------------- When you include a STI class in a ''find'' : @results = Result.find :all, :include => :event , you are forced to specify the fk and the class name : belongs_to :event , :class_name => "Event", :foreign_key => "event_id" . Full code: ----------- class Event <
2006 Oct 20
0
FK references in DBDesigner4?
I seem to have trouble getting DBD4 to create ActiveRecord-compatible DDL statements. I have a database with a series of 1:n relationships which should be easy to model. But, depending on the relationship type I use, when I connect them in the ERD it either: 1) starts cascading foreign keys like an avalanche, or 2) fails to add ''contraint fk_xxx foreign key (yyy) references
2006 Aug 23
1
problems with Oracle: FK, triggers
Hi All! Is anyone working with Oracle on Rails? What about testing? I will be very happy if you can help me: 1) When I run rake test:unit it removes all my sequences in test enviroment. And I get an error like "OCIError: ORA-02289: sequence does not exist" But when I run rake db:test:clone_structure I can see all sequences again. Where is a problem? 2) How I can take proper
2007 Jan 31
0
radio buttons => What if the value is a FK?
Hi: I have radio buttons like this in my view: <%= radio_button :goals, :goaltype_id, ''Recurring'', { :onclick => "new Effect.SlideDown(''recurring''); return false;" } %>&nbsp;&nbsp;Recurring<br /> <%= radio_button :goals, :goaltype_id, ''One-time'', { :onclick => "new
2006 Mar 11
2
assignment of parent ID in child''s fk field
When I create a child record I''m not automagically getting the parent ID put into the fk field. Does object.new take parameters that allows me to do that as part of the AR record creation? Or do I need to do it separately? Or am I missing the boat altogether ;-) Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Mar 15
4
[NQ] How to set an initial FK for a new item of something?
Hi all, running into a little problem here. I''ve a list of things with a "New thing" link beneath it. When you click that link, obviously, a new thing shall be created. Now, that works pretty fine for things that don''t have foreign keys, but for things that do it crashes, since there is not yet a thing.other_thing.name available. I suspect you can somewhere in
2010 Jan 27
2
RMySQL - Bulk loading data and creating FK links
I have a table (contact) with several fields and it's PK is an auto increment field. I'm bulk loading data to this table from files which if successful will be about 3.5million rows (approx 16000 rows per file). However, I have a linking table (an_contact) to resolve a m:m relationship between the an and contact tables. How can I retrieve the PK's for the data bulk loaded into
2009 Oct 08
6
Eager Loading a Relationship That Has No PK/FK
I''m attempting to wrestle an old DB into Rails. This relationship is giving me trouble: class Show < AR::Base has_many :segments end class Segment < AR::Base belongs_to :show has_one :media #this has no PK/FK relation end A Segment is "linked" to Media by Media.name, which is the result of concatenating Segment.name and Segment.part. As I said there are is no
2007 Jun 09
7
create 2 fk referencing the same table
Hi everyone! I have a problem with defining 2 fk referencing the same table. I have a Program table and a Team table. The Program should have an away team and a home team fk. From my understanding, "the fk column should be named after the class of the target table, converted to lowercase, with _id appended". But, in my case, I have 2 fk referencing the same table. How can I do this?
2005 Jun 27
9
FK constraints overrated?
Hello folks, I use to think that a relational databases without foreign keys constraints enforced strictly by the RDBMS were no good, piece of crap, data junk. However, I''ve also learned the hard way that FKs constraints imposes serious difficulties when moving data around, specially between different DBs, or for loading test data or for upgrading DBs schemas, or for porting DBs
2007 Jan 16
0
9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_cache.c libswfdec/swfdec_cached.c libswfdec/swfdec_cached.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_image.c
libswfdec/Makefile.am | 4 libswfdec/js/jsapi.c | 6 - libswfdec/js/jsapi.h | 6 - libswfdec/js/jsfun.h | 2 libswfdec/js/jsinterp.c | 2 libswfdec/js/jsobj.c | 8 - libswfdec/js/jsobj.h | 6 - libswfdec/js/jspubtd.h | 4 libswfdec/js/jsscope.c | 2
2007 Jan 24
0
hm :through -- nonstandard fk's
+1 for http://dev.rubyonrails.org/ticket/6466 Would someone mind reviewing this one? It concerns adds and deletes on has_many :through associations that don''t use the standard foreign key naming structure. I spent an hour tracking this down before checking Trac. D''oh!
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
configure.ac | 27 +++ doc/Makefile.am | 3 doc/swfdec-docs.sgml | 1 doc/swfdec-sections.txt | 18 ++ doc/swfdec.types | 2 libswfdec-gtk/Makefile.am | 6 libswfdec-gtk/swfdec-gtk.h | 1 libswfdec-gtk/swfdec_gtk_loader.c | 243