-
Notifications
You must be signed in to change notification settings - Fork 199
Description
Original Reporter: sjwhyte
Environment: OSX, Grails 2.3.7, mongodb plugin 2.0.0
Version: 2.0.0.GA
Migrated From: http://jira.grails.org/browse/GPMONGODB-358
When persisting adding dynamic attributes get a the following error while trying to save the following:
{code}
def event3 = new DeviceEvent(macAddress: macAddress,
eventDate: DateTimeFormat.forPattern("YYYY-MM-dd'T'HH:mm:ss.SSSZZ").parseDateTime('2014-01-28T13:36:43.523Z'),
eventType: 'BiometricEvent',
eventMessage: 'Accelerometer Event [x=0,y=0,z=-1]')
event3['biometricAction'] = 'Stopped standing straight'
event3['xValue'] = 0d
event3['yValue'] = 0d
event3['zValue'] = -1d
event3.save(failOnError: true)
{code}
{code}
Error 2014-03-21 09:04:47,631 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Cannot obtain DBObject for transient instance, save a valid instance first Message: Cannot obtain DBObject for transient instance, save a valid instance first
{code}