Fixtures Plugin Referential Integrity Exceptions In Grails
I have an object Foo that has a bidirectional one-to-one relationship with
Bar and another one with Baz. When I try to do a .load with Foo and only
give it a Bar, I get referential integrity exceptions complaining that
there isn't a Baz.
Should this really be the case? In a real world environment isn't it
possible that there wouldn't be any matching Baz object in the database?
I tried manually setting baz:null in the fixtures load closure, but I
still get the same thing. On a side note, when I only set properties (such
as a simple string), everything works fine. It's only when I start setting
relationships.
This is with Grails 2.2.4, Fixtures 1.2, and without the build-test-data
plugin installed.
No comments:
Post a Comment