|
I think it might be related to this:
I took an old app, I think I was running M4?.. upgraded it to the latest mongodb plugin etc. Now, when I try to persist one of my 3 tiny little domain objects, I get this: java.lang.IllegalArgumentException: can't serialize class com.foo.AnalyticItemat org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:234) I never in the past had any problems serializing the class: package com.foo
import org.bson.types.ObjectId
class AnalyticItem {
ObjectId id
List ip
Date date
String action
String featureName
String sid
String pid
String uid
String url
String agent
String clientProductId
static constraints = {
featureName(nullable: true)
clientProductId(nullable: true)
pid(nullable:true)
uid(nullable:true)
}
} thoughts? Thanks, Roger |
|
Addendum.. this error comes up, when I try to save one of these:
class UserSession { ObjectId id Set<AnalyticItem> sessionAnalytics Date sessionStartDate String sid static mapping = { sid index: true, indexAttributes: [unique: true, dropDups: true] } } did something change, where now i'd have to do: class Person {
String firstName
String lastName
Address address
List otherAddresses
static embedded = ['address', 'otherAddresses']
}Basically have: List sessionAnalytics static embedded = ['sessionAnalytics'] I didn't think I had to explicity make another domain object embedded to relate them, but that is the only example shown in the GORM MongoDb docs Thanks, Roger On Dec 20, 2011, at 8:15 PM, Roger Studner wrote:
|
| Powered by Nabble | Edit this page |
