{"action":"created","issue":{"url":"https://api.github.com/repos/grails/grails-data-mapping/issues/579","labels_url":"https://api.github.com/repos/grails/grails-data-mapping/issues/579/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-data-mapping/issues/579/comments","events_url":"https://api.github.com/repos/grails/grails-data-mapping/issues/579/events","html_url":"https://github.com/grails/grails-data-mapping/issues/579","id":116377033,"number":579,"title":"Cascade validation not working on associations","user":{"login":"mburak","id":944294,"avatar_url":"https://avatars.githubusercontent.com/u/944294?v=3","gravatar_id":"","url":"https://api.github.com/users/mburak","html_url":"https://github.com/mburak","followers_url":"https://api.github.com/users/mburak/followers","following_url":"https://api.github.com/users/mburak/following{/other_user}","gists_url":"https://api.github.com/users/mburak/gists{/gist_id}","starred_url":"https://api.github.com/users/mburak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mburak/subscriptions","organizations_url":"https://api.github.com/users/mburak/orgs","repos_url":"https://api.github.com/users/mburak/repos","events_url":"https://api.github.com/users/mburak/events{/privacy}","received_events_url":"https://api.github.com/users/mburak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grails/grails-data-mapping/labels/neo4j","name":"neo4j","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-11T16:58:20Z","updated_at":"2015-11-30T20:33:30Z","closed_at":null,"body":"Having this model:\r\n\r\n```\r\nclass Club {\r\n  hasMany = [players: Player]\r\n}\r\n\r\nclass Player {\r\n  String name\r\n  String position\r\n\r\n  static belongsTo = [club: Club]\r\n\r\n  static constraints = {\r\n    name nullable: false\r\n    position nullable: false\r\n  }\r\n}\r\n```\r\n\r\nIf I do this:\r\n```\r\nPlayer player = new Player(name: \"Messi\")\r\nClub club = new Club(name: \"Barcelona\")\r\nclub.addToPlayers(player)\r\nclub.save()\r\n```\r\n\r\nthen the club and the player are save correctly even when the player is not valid (it doesn't have the \"position\" property set)\r\n\r\nIsn't that supposed to be cascade validated by default?\r\n\r\nYou can reproduce this issue in this project: https://github.com/mburak/neo4j-app and just starting it up. On Bootstrap we are creating some invalid players. \r\n"},"comment":{"url":"https://api.github.com/repos/grails/grails-data-mapping/issues/comments/160753417","html_url":"https://github.com/grails/grails-data-mapping/issues/579#issuecomment-160753417","issue_url":"https://api.github.com/repos/grails/grails-data-mapping/issues/579","id":160753417,"user":{"login":"graemerocher","id":66626,"avatar_url":"https://avatars.githubusercontent.com/u/66626?v=3","gravatar_id":"","url":"https://api.github.com/users/graemerocher","html_url":"https://github.com/graemerocher","followers_url":"https://api.github.com/users/graemerocher/followers","following_url":"https://api.github.com/users/graemerocher/following{/other_user}","gists_url":"https://api.github.com/users/graemerocher/gists{/gist_id}","starred_url":"https://api.github.com/users/graemerocher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemerocher/subscriptions","organizations_url":"https://api.github.com/users/graemerocher/orgs","repos_url":"https://api.github.com/users/graemerocher/repos","events_url":"https://api.github.com/users/graemerocher/events{/privacy}","received_events_url":"https://api.github.com/users/graemerocher/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T20:33:30Z","updated_at":"2015-11-30T20:33:30Z","body":"Depends on https://github.com/grails/grails-core/issues/9452"}}