daniel-lima/grails-hibernate-spatial-plugin — pull request #1 by jkburges (2012-06-18 00:27:37+00:00)
Title: Fix for dynamic finders with grails 2 style unit tests and JTS geometry type (Point)

Hi there,

Ran in to a problem with dynamic finders, grails 2 and JTS types:

org.springframework.dao.InvalidDataAccessResourceUsageException: Cannot query [hibernate_spatial_unit_test.PointOfInterest] on non-existent property: location
at org.grails.datastore.mapping.simple.query.SimpleMapQuery.getValidProperty(SimpleMapQuery.groovy:726)
at org.grails.datastore.mapping.simple.query.SimpleMapQuery.executeSubQueryInternal(SimpleMapQuery.groovy:664)
at org.grails.datastore.mapping.simple.query.SimpleMapQuery.executeSubQuery(SimpleMapQuery.groovy:650)
at org.grails.datastore.mapping.simple.query.SimpleMapQuery.executeQuery(SimpleMapQuery.groovy:63)
at org.grails.datastore.mapping.query.Query.list(Query.java:486)
at org.grails.datastore.gorm.finders.AbstractFindByFinder.invokeQuery(AbstractFindByFinder.java:34)
at org.grails.datastore.gorm.finders.AbstractFindByFinder$1.doInSession(AbstractFindByFinder.java:26)
at org.grails.datastore.mapping.core.DatastoreUtils.execute(DatastoreUtils.java:301)
at org.grails.datastore.gorm.finders.AbstractFinder.execute(AbstractFinder.java:40)
at org.grails.datastore.gorm.finders.AbstractFindByFinder.doInvokeInternal(AbstractFindByFinder.java:24)
at org.grails.datastore.gorm.finders.DynamicFinder.invoke(DynamicFinder.java:151)
at org.grails.datastore.gorm.finders.DynamicFinder.invoke(DynamicFinder.java:352)
at org.grails.datastore.gorm.GormStaticApi.methodMissing(GormStaticApi.groovy:108)
at PointOfInterestTests.testFindByLocation(PointOfInterestTests.groovy:14)

Comment out/delete "scripts/_Events.groovy" to re-create the bug.

Not sure if you want to include fix in the plugin, but here it is anyway...

Cheers,
Jon