On Fri, December 2, 2011 06:32, Rodrigo Rosenfeld Rosas wrote: > Em 01-12-2011 23:28, matthuhiggins escreveu: >> it should be noted that the update I offered has zero >> effect on those not using foreign keys. It's also worth >> suggesting that the initial version can start with no >> cascading options, so that all application logic is >> kept in the application, and the foreign keys >> act as a neutral constraint similar to NOT NULL. > > I don't think this is right. A foreign key could be null. > If you don't want it to be null you should be explicit > about it. >
I do not think that is what the OP means. I believe that he is trying to say that implementing a non-cascading Fk at the DBMS level can be considered a 'backstop' to any application logic in (or missing from) the model. This may be considered similar to how the NOT NULL constraint at the DBMS level is presently used inside AR. It just catches logic errors before they hit the DB. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:byrn...@harte-lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.