Details
Description
sample project attached.
If you unzip the project and run test-app, the tests will fail. Open the Author domain class and comment out the empty "beforeUpdate()" method - then run test-app again. the tests will pass.
-
Hide
- eventing-bug-report-13032012.zip
- 13/Mar/12 6:09 AM
- 22 kB
- Mike Hugo
-
- grails-app/.../ApplicationResources.groovy 0.1 kB
- grails-app/conf/BootStrap.groovy 0.1 kB
- grails-app/conf/BuildConfig.groovy 2 kB
- grails-app/conf/Config.groovy 4 kB
- grails-app/conf/DataSource.groovy 1 kB
- grails-app/conf/UrlMappings.groovy 0.2 kB
- grails-app/conf/spring/resources.groovy 0.0 kB
- grails-app/domain/eventing/Author.groovy 0.1 kB
- grails-app/domain/eventing/Book.groovy 0.1 kB
- grails-app/i18n/messages.properties 3 kB
- grails-app/.../messages_cs_CZ.properties 3 kB
- grails-app/i18n/messages_da.properties 3 kB
- grails-app/i18n/messages_de.properties 4 kB
- grails-app/i18n/messages_es.properties 3 kB
- grails-app/i18n/messages_fr.properties 2 kB
- grails-app/i18n/messages_it.properties 2 kB
- grails-app/i18n/messages_ja.properties 4 kB
- grails-app/i18n/messages_nl.properties 3 kB
- grails-app/.../messages_pt_BR.properties 3 kB
- grails-app/.../messages_pt_PT.properties 3 kB
- grails-app/i18n/messages_ru.properties 4 kB
- grails-app/i18n/messages_sv.properties 3 kB
- grails-app/i18n/messages_th.properties 6 kB
- grails-app/.../messages_zh_CN.properties 2 kB
- grails-app/views/error.gsp 0.3 kB
- grails-app/views/index.gsp 3 kB
- grails-app/views/layouts/main.gsp 2 kB
- test/unit/eventing/BookTests.groovy 0.4 kB
- application.properties 0.1 kB
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Hide
Błażej Bucko
added a comment -
This fix introduced another bug. If you add this to the end of unit test:
a.book = null a.save(failOnError:true) assert a.book == Author.findByBookIsNull().id
you'll get:
java.lang.NullPointerException at org.grails.datastore.mapping.engine.NativeEntryEntityPersister$NativeEntryModifyingEntityAccess.setProperty(NativeEntryEntityPersister.java:1426)
Show
Błażej Bucko
added a comment - This fix introduced another bug. If you add this to the end of unit test:
a.book = null
a.save(failOnError: true )
assert a.book == Author.findByBookIsNull().id
you'll get:
java.lang.NullPointerException at org.grails.datastore.mapping.engine.NativeEntryEntityPersister$NativeEntryModifyingEntityAccess.setProperty(NativeEntryEntityPersister.java:1426)
Show
Graeme Rocher
added a comment - Please raise a separate JIRA for that and attach an example
Show
Graeme Rocher
added a comment - fixed regression GRAILS-8977
fixed by https://github.com/SpringSource/grails-data-mapping/commit/e77a48a3292abaf9cbea95c14f4fde8ca3634d14