There is problem with initialization of embedded classes. When I use entityManager.createQuery().getResultList(); embedded classes are not initialized. Using entityManager.find(classname, id) works properly and loads everything.
The reason for this, I believe, is that when selecting with query MassIndexingMongoDBTupleSnapshot is created to extract data from DBObject. With embedded object "password" with field "hashCode" method tuple.get() is called with colum=password.hashCode, and current impl can't extract this correctly from DBObject. With entityManager.find() MongoDBTupleSnapshot is used, and it covers the case with this lines of code: (75:78)
if ( column.contains( "." ) ) { String[] fields = EMBEDDED_FIELDNAME_SEPARATOR.split( column, 0 ); return this.getObject( this.dbObject.toMap(), fields, 0 ); }
|