Hi All, I have a situation where a one to many relationship (Group to PurchaseRequests) works differently in when in test and development environments.
IN my purchase_request model I have: has 1, :group I don't have any relationship information in the group model In development mode this works as I expect. I can create groups independent of purchase requests. The following command creates a group Group.create :title => 'a group', :description => 'a description' In test mode the same command errors with: Purchase request must not be blank I tried adding belongs_to :purchase_request to the group model but that always requires a purchase_request and that is not what I want. My tests do DataMapper.auto_migrate! (and I added Group.auto_migrate! to test) but it doesn't have any impact. I tried actually deleting the test.sqlite3 database file but it still is created with a purchase_request_id field. The development.sqlite3 database does not have a purchase_request_id field. This tells me that the problem occurs when the database is created from auto_migrate!. I cannot figure out why these databases would be created differently Any help would be greatly appreciated. I'm using DataMapper 10.2 and rails 2.3.5 -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
