|
I have a situation where I can't use belongsTo on the other side of a 1-to-1 relationship. I tried using the explicit cascade from the ORM DSL, but it doesn't seem to work.
I.e.
class A { B b static mapping = { b cascade: "all" } } Shouldn't this force cascading?
Example: If I have an a instance, where b should have errors, and I do a.validate(), I get no errors on either object (and yes they are attached, i.e. a.b = b). If I do b.validate(), I get the errors. So it is not cascading. I am using Grails 2.0.1.... Thanks |
|
That settings doesn't currently configure cascading validation, just cascading persistence.
-- Graeme Rocher On Wednesday, February 22, 2012 at 6:05 PM, Alan Bowsher wrote:
|
|
Well... thanks for the answer, but... wouldn't a save with (validate: true) need to cascade the validation?
On Thu, Feb 23, 2012 at 5:06 AM, Graeme Rocher <[hidden email]> wrote:
|
|
Sounds like our issues may be related. Here's a post I created yesterday...
http://grails.1312388.n4.nabble.com/Is-belongsTo-broken-in-Grails-2-0-td4411295.html |
| Powered by Nabble | Edit this page |
