Status: In Progress
Affects Version/s: 2.0.1, 2.0.3, 2.0.4
Fix Version/s: None
Grails 2.0.4 (faced since 2.0.1),
spring-security plugin's family,
STS 64-bit 2.9.2
We have such domain classes relationships (see project's domain classes sources and an integration test attached):
In /conf/BootStrap.groovy I'm populating DB configured in /conf/DataSource.groovy (having dbCreate = 'create' for 'dev' environment).
TrackPost.tags association is being populated and saved only for NEWLY created TrackPost instance. When I'm trying to add tags to EXISTENT TrackPost instance - there is an DB/Hibernate exception thrown:
The full console trace is at the BootStrap.groovy's bottom.
That's for many-to-many association. The worst thing is, there is the same problem for one-to-many association for TrackPost.comments. There is CommentIntegrationTests.groovy included which demonstrates the problem (again full trace is in the file):
I faced this problem first time in Grails 2.0.1, then it's been there in every version except 2.0.2 which I didn't use.
The code included comprises the plugins we use, cause I couldn't re-create the problem as 'simplified' version without plugins. Are there chances the problem is being introduced by some plugin ?
Anyways, this functionality is critical for us, that's why I'm following Graeme's advice (contacted him directly some time ago) and reporting the problem here.
Look forward for your help guys !