具有嵌入式类型查询的Mongo / DataNucleus / JPA给出:找不到(部分)的类型...因为符号没有类型;隐含变量?

时间:2013-06-15 18:48:23

标签: mongodb jpa datanucleus

我正在尝试此JPA查询"SELECT ml FROM MediaLibrary ml WHERE ml.media.id = :id"并收到此错误消息:"Cannot find type of (part of) ml.media.id since symbol has no type; implicit variable?"

我意识到应该是某种MEMBER OF查询,但我尝试了同样的结果。我希望找到包含id等于给定值的媒体的媒体库。

简化代码:

@Entity( name = "MediaLibrary" )
@Table( name = "MediaLibrary" )
public class MediaLibrary implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String mediaLibraryKey;

    @Embedded
    private Set<Media> media;
....

@Embeddable
public class Media implements GenericDataProducer, CreationDateKnown, Serializable {
    private static final long serialVersionUID = 1L;

    @Column
    private String id;
....

我的Mongo数据看起来像我预期的那样:

db.MediaLibrary.find().pretty();
{
"_id" : ObjectId("51bcb440b3060638e5890581"),
    ....
"media" : [
    {
                    ....
        "id" : "f0f9b014-24b1-4408-b0aa-3c9f74c822f8",
                    ....
    }
]
}

更新:工作命令行mongodb查询是这样的:

db.MediaLibrary.find( { "media" : { $elemMatch : { "id" : "f0f9b014-24b1-4408-b0aa-3c9f74c822f8" } } } );

或在java中:

new BasicDBObject( "media", new BasicDBObject( "$elemMatch", new BasicDBObject("id", id) ) );

更新:另一个查询:"SELECT ml FROM MediaLibrary ml WHERE :id MEMBER OF ml.media.id"

并在FINE级别输出:

FINE: JPQL Single-String with "SELECT ml FROM MediaLibrary ml WHERE :id MEMBER OF ml.media.id"
Jun 16, 2013 12:47:04 PM org.datanucleus.store.query.AbstractJPQLQuery compileInternal
FINE: JPQL Query : Compiling "SELECT ml FROM MediaLibrary ml WHERE :id MEMBER OF ml.media.id"
Jun 16, 2013 12:47:04 PM com.xonami.rest.server.MyServerResource log
SEVERE: com.xonami.rest.server.media.MediaStateNoIdResource in log:
org.datanucleus.exceptions.NucleusUserException: Cannot find type of (part of) ml.media.id since symbol has no type; implicit variable?: Cannot find type of (part of) ml.media.id since symbol has no type; implicit variable?
     at org.datanucleus.query.expression.PrimaryExpression.bind (PrimaryExpression.java: 274)
     at org.datanucleus.query.expression.InvokeExpression.bind (InvokeExpression.java: 97)
     at org.datanucleus.query.compiler.JavaQueryCompiler.compileFilter (JavaQueryCompiler.java: 475)
     at org.datanucleus.query.compiler.JPQLCompiler.compile (JPQLCompiler.java: 81)
     at org.datanucleus.store.query.AbstractJPQLQuery.compileInternal (AbstractJPQLQuery.java: 271)
     at org.datanucleus.store.mongodb.query.JPQLQuery.compileInternal (JPQLQuery.java: 163)
     at org.datanucleus.store.query.Query.setImplicitParameter (Query.java: 811)
     at org.datanucleus.api.jpa.JPAQuery.setParameter (JPAQuery.java: 438)
     at org.datanucleus.api.jpa.JPAQuery.setParameter (JPAQuery.java: 58)
     at com.xonami.rest.cache.DataFetcher.getMediaById (DataFetcher.java: 205)

更新

查询的

SELECT ml FROM MediaLibrary ml, Media m WHERE m MEMBER OF ml.media AND m.id = :id

Jun 17, 2013 11:54:00 AM org.datanucleus.query.JPQLSingleStringParser 
FINE: JPQL Single-String with "SELECT ml FROM MediaLibrary ml, Media m WHERE m MEMBER OF ml.media AND m.id = :id"
Jun 17, 2013 11:54:00 AM org.datanucleus.store.query.AbstractJPQLQuery compileInternal
FINE: JPQL Query : Compiling "SELECT ml FROM MediaLibrary ml, Media m WHERE m MEMBER OF ml.media AND m.id = :id"
Jun 17, 2013 11:54:00 AM org.datanucleus.store.query.AbstractJPQLQuery compileInternal
FINE: JPQL Query : Compile Time = 2 ms
Jun 17, 2013 11:54:00 AM org.datanucleus.store.query.AbstractJPQLQuery compileInternal
FINE: QueryCompilation:
  [from:ClassExpression(alias=ml),ClassExpression(alias=m)]
  [filter:DyadicExpression{InvokeExpression{[PrimaryExpression{ml.media}].contains(PrimaryExpression{m})}  AND  DyadicExpression{PrimaryExpression{m.id}  =  ParameterExpression{id}}}]
  [symbols: id type=java.lang.String, m type=com.xonami.rest.db.Media, ml type=com.xonami.rest.db.MediaLibrary]
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.JPQLQuery compileQueryFull
FINE: JPQL Query : Compiling "SELECT ml FROM MediaLibrary ml, Media m WHERE m MEMBER OF ml.media AND m.id = :id" for datastore
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.QueryToMongoDBMapper compileFilter
FINE: Compilation of filter to be evaluated completely in-datastore was impossible : Invoke expression is not supported by this mapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.JPQLQuery compileQueryFull
FINE: JPQL Query : Compile Time for datastore = 0 ms
Jun 17, 2013 11:54:00 AM org.datanucleus.store.query.AbstractJPQLQuery compileInternal
FINE: JPQL Query : Compiling "SELECT FROM MediaLibrary ml, Media m WHERE m MEMBER OF ml.media AND m.id = :id"
Jun 17, 2013 11:54:00 AM org.datanucleus.util.Imports resolveClassDeclaration
FINE: Class MediaLibrary was resolved to be com.xonami.rest.db.MediaLibrary. It wasnt defined fully-qualified so had to be looked up; you can avoid the lookup (and improve performance) by fully-qualifying the class in the query.
Jun 17, 2013 11:54:00 AM org.datanucleus.util.Imports resolveClassDeclaration
FINE: Class Media was resolved to be com.xonami.rest.db.Media. It wasnt defined fully-qualified so had to be looked up; you can avoid the lookup (and improve performance) by fully-qualifying the class in the query.
Jun 17, 2013 11:54:00 AM org.datanucleus.store.query.AbstractJPQLQuery compileInternal
FINE: JPQL Query : Compile Time = 1 ms
Jun 17, 2013 11:54:00 AM org.datanucleus.store.query.AbstractJPQLQuery compileInternal
FINE: QueryCompilation:
  [from:ClassExpression(alias=ml),ClassExpression(alias=m)]
  [filter:DyadicExpression{InvokeExpression{[PrimaryExpression{ml.media}].contains(PrimaryExpression{m})}  AND  DyadicExpression{PrimaryExpression{m.id}  =  ParameterExpression{id}}}]
  [symbols: id type=java.lang.String, m type=com.xonami.rest.db.Media, ml type=com.xonami.rest.db.MediaLibrary]
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.JPQLQuery compileQueryFull
FINE: JPQL Query : Compiling "SELECT FROM MediaLibrary ml, Media m WHERE m MEMBER OF ml.media AND m.id = :id" for datastore
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.QueryToMongoDBMapper compileFilter
FINE: Compilation of filter to be evaluated completely in-datastore was impossible : Invoke expression is not supported by this mapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.JPQLQuery compileQueryFull
FINE: JPQL Query : Compile Time for datastore = 0 ms
Jun 17, 2013 11:54:00 AM org.datanucleus.store.connection.ConnectionManagerImpl allocateConnection
FINE: Connection added to the pool : org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=null, commitOnRelease=true, closeOnRelease=true, closeOnTxnEnd=false] for key=org.datanucleus.ExecutionContextImpl@519549e in factory=ConnectionFactory:tx[org.datanucleus.store.mongodb.ConnectionFactoryImpl@4fb7a553]
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl obtainNewConnection
FINE: Managed connection org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=com.mongodb.DBApiLayer@61ffbcb, commitOnRelease=true, closeOnRelease=true, closeOnTxnEnd=false] is starting
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.JPQLQuery performExecute
FINE: JPQL Query : Executing "SELECT FROM MediaLibrary ml, Media m WHERE m MEMBER OF ml.media AND m.id = :id" ...
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.MongoDBUtils getObjectsOfCandidateType
FINE: Performing find() using query on collection MediaLibrary for fields={ "mediaLibraryKey" : 1 , "owner" : 1 , "projectKey" : 1 , "quota" : 1} with filter={ }
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.LazyLoadQueryResult closingConnection
INFO: Reading in results for query "SELECT FROM MediaLibrary ml, Media m WHERE m MEMBER OF ml.media AND m.id = :id" since the connection used is closing
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl getObjectFromLevel1Cache
FINE: Object "com.xonami.rest.db.MediaLibrary@774943d6" (id="com.xonami.rest.db.MediaLibrary:51bf3116b306d15598ec06c6") taken from Level 1 cache (loadedFlags="[NYYYY]") [cache size = 5]
Jun 17, 2013 11:54:00 AM org.datanucleus.query.evaluator.JavaQueryEvaluator execute
FINE: JPQL Query : Processing the "filter" clause using in-memory evaluation (clause = "DyadicExpression{InvokeExpression{[PrimaryExpression{ml.media}].contains(PrimaryExpression{m})}  AND  DyadicExpression{PrimaryExpression{m.id}  =  ParameterExpression{id}}}")
Jun 17, 2013 11:54:00 AM org.datanucleus.query.evaluator.JavaQueryEvaluator handleFilter
FINE: Evaluating filter for 1 candidates
Jun 17, 2013 11:54:00 AM org.datanucleus.store.connection.ConnectionManagerImpl allocateConnection
FINE: Connection found in the pool : org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=com.mongodb.DBApiLayer@61ffbcb, commitOnRelease=true, closeOnRelease=true, closeOnTxnEnd=false] for key=org.datanucleus.ExecutionContextImpl@519549e in factory=ConnectionFactory:tx[org.datanucleus.store.mongodb.ConnectionFactoryImpl@4fb7a553]
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.MongoDBPersistenceHandler fetchObject
FINE: Fetching object "com.xonami.rest.db.MediaLibrary@774943d6" (id=51bf3116b306d15598ec06c6) fields [media]
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.MongoDBPersistenceHandler fetchObject
FINE: Object "com.xonami.rest.db.MediaLibrary@774943d6" (id="51bf3116b306d15598ec06c6") being retrieved from MongoDB
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.MongoDBUtils getObjectForObjectProvider
FINE: Retrieving object for { "_id" : { "$oid" : "51bf3116b306d15598ec06c6"}}
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl putObjectIntoLevel1Cache
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="org.datanucleus.identity.IdentityReference@44cae5b8") added to Level 1 cache (loadedFlags="[NNNNNNNNNNN]")
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the value in field "applications" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.types.simple.ArrayList initialise
FINE: Created SCO wrapper for object "com.xonami.rest.db.Media@64afb650" field "applications" with 1 entries, using options="cached,allowNulls"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the value in field "cTime" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the value in field "mediaStates" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.types.simple.ArrayList initialise
FINE: Created SCO wrapper for object "com.xonami.rest.db.Media@64afb650" field "mediaStates" with 0 entries, using options="cached,allowNulls"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the value in field "projectVLists" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.types.simple.ArrayList initialise
FINE: Created SCO wrapper for object "com.xonami.rest.db.Media@64afb650" field "projectVLists" with 0 entries, using options="cached,allowNulls"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the value in field "propertyKeys" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.types.simple.ArrayList initialise
FINE: Created SCO wrapper for object "com.xonami.rest.db.Media@64afb650" field "propertyKeys" with 2 entries, using options="cached,allowNulls"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the value in field "propertyValues" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.types.simple.ArrayList initialise
FINE: Created SCO wrapper for object "com.xonami.rest.db.Media@64afb650" field "propertyValues" with 2 entries, using options="cached,allowNulls"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the value in field "searchList" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.types.simple.ArrayList initialise
FINE: Created SCO wrapper for object "com.xonami.rest.db.Media@64afb650" field "searchList" with 6 entries, using options="cached,allowNulls"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the value in field "tags" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.types.simple.ArrayList initialise
FINE: Created SCO wrapper for object "com.xonami.rest.db.Media@64afb650" field "tags" with 2 entries, using options="cached,allowNulls"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager wrapSCOField
FINE: Object "com.xonami.rest.db.MediaLibrary@774943d6" (id="com.xonami.rest.db.MediaLibrary:51bf3116b306d15598ec06c6") is having the value in field "media" replaced by a SCO wrapper
Jun 17, 2013 11:54:00 AM org.datanucleus.store.types.simple.HashSet initialise
FINE: Created SCO wrapper for object "com.xonami.rest.db.MediaLibrary@774943d6" field "media" with 1 entries, using options="cached,allowNulls"
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.MongoDBPersistenceHandler fetchObject
FINE: Execution Time = 4 ms
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl release
FINE: Managed connection org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=com.mongodb.DBApiLayer@61ffbcb, commitOnRelease=true, closeOnRelease=false, closeOnTxnEnd=false] is committing
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl release
FINE: Managed connection org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=com.mongodb.DBApiLayer@61ffbcb, commitOnRelease=true, closeOnRelease=false, closeOnTxnEnd=false] committed connection
Jun 17, 2013 11:54:00 AM org.datanucleus.state.AbstractStateManager updateLevel2CacheForFields
FINE: Object "com.xonami.rest.db.MediaLibrary@774943d6" (id="51bf3116b306d15598ec06c6") is having the following fields in Level 2 cache object updated : [0]
Jun 17, 2013 11:54:00 AM org.datanucleus.query.evaluator.memory.InMemoryExpressionEvaluator getValueForPrimaryExpression
SEVERE: Cannot find m member of com.xonami.rest.db.MediaLibrary
Jun 17, 2013 11:54:00 AM org.datanucleus.query.evaluator.memory.InMemoryExpressionEvaluator getValueForPrimaryExpression
SEVERE: Cannot find m member of com.xonami.rest.db.MediaLibrary
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.query.JPQLQuery performExecute
FINE: JPQL Query : Execution Time = 9 ms
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl release
FINE: Managed connection org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=com.mongodb.DBApiLayer@61ffbcb, commitOnRelease=true, closeOnRelease=false, closeOnTxnEnd=false] is committing
Jun 17, 2013 11:54:00 AM org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl release
FINE: Managed connection org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=com.mongodb.DBApiLayer@61ffbcb, commitOnRelease=true, closeOnRelease=false, closeOnTxnEnd=false] committed connection
Jun 17, 2013 11:54:00 AM com.xonami.rest.LogWrapper log
INFO: Not found.
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl performDetachOnClose
FINE: DetachOnClose : Closing manager so detaching all current objects ...
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager detach
FINE: Detaching object from persistence : "com.xonami.rest.db.ProjectLibrary@9ec265c" (depth=0)
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.ProjectLibrary@9ec265c" (id="com.xonami.rest.db.ProjectLibrary:51bf3116b306d15598ec06c5") is having the SCO wrapper in field "ownedProjects" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager detach
FINE: Detaching object from persistence : "com.xonami.rest.db.XonamiUser@397b6178" (depth=1)
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "creationDate" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager detach
FINE: Detaching object from persistence : "com.xonami.rest.db.EmailAddress@131b92e6" (depth=2)
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.EmailAddress@131b92e6" (id="com.xonami.rest.db.EmailAddress:51bf3117b306d15598ec06c8") is having the SCO wrapper in field "created" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.LifeCycleState changeState
FINE: Object "com.xonami.rest.db.EmailAddress@131b92e6" (id="com.xonami.rest.db.EmailAddress:51bf3117b306d15598ec06c8") has a lifecycle change : "P_NONTRANS"->"DETACHED_CLEAN"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager disconnect
FINE: Disconnecting com.xonami.rest.db.EmailAddress@131b92e6 from StateManager[pc=com.xonami.rest.db.EmailAddress@131b92e6, lifecycle=DETACHED_CLEAN]
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl removeObjectFromLevel1Cache
FINE: Object with id="com.xonami.rest.db.EmailAddress:51bf3117b306d15598ec06c8" being removed from Level 1 cache [current cache size = 6]
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "emails" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager detach
FINE: Detaching object from persistence : "com.xonami.rest.db.MediaLibrary@774943d6" (depth=2)
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager detach
FINE: Detaching object from persistence : "com.xonami.rest.db.Media@64afb650" (depth=2)
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the SCO wrapper in field "applications" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the SCO wrapper in field "cTime" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the SCO wrapper in field "mediaStates" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the SCO wrapper in field "projectVLists" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the SCO wrapper in field "propertyKeys" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the SCO wrapper in field "propertyValues" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the SCO wrapper in field "searchList" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="") is having the SCO wrapper in field "tags" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.LifeCycleState changeState
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="org.datanucleus.identity.IdentityReference@44cae5b8") has a lifecycle change : "P_CLEAN"->"DETACHED_CLEAN"
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl evictFromTransaction
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="org.datanucleus.identity.IdentityReference@44cae5b8") being evicted from transactional cache
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl evictFromTransaction
FINE: Object "com.xonami.rest.db.Media@64afb650" (id="org.datanucleus.identity.IdentityReference@44cae5b8") is not transactional
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager disconnect
FINE: Disconnecting com.xonami.rest.db.Media@64afb650 from StateManager[pc=com.xonami.rest.db.Media@64afb650, lifecycle=DETACHED_CLEAN]
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl removeObjectFromLevel1Cache
FINE: Object with id="org.datanucleus.identity.IdentityReference@44cae5b8" being removed from Level 1 cache [current cache size = 5]
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.MediaLibrary@774943d6" (id="com.xonami.rest.db.MediaLibrary:51bf3116b306d15598ec06c6") is having the SCO wrapper in field "media" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.LifeCycleState changeState
FINE: Object "com.xonami.rest.db.MediaLibrary@774943d6" (id="com.xonami.rest.db.MediaLibrary:51bf3116b306d15598ec06c6") has a lifecycle change : "P_NONTRANS"->"DETACHED_CLEAN"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager disconnect
FINE: Disconnecting com.xonami.rest.db.MediaLibrary@774943d6 from StateManager[pc=com.xonami.rest.db.MediaLibrary@774943d6, lifecycle=DETACHED_CLEAN]
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl removeObjectFromLevel1Cache
FINE: Object with id="com.xonami.rest.db.MediaLibrary:51bf3116b306d15598ec06c6" being removed from Level 1 cache [current cache size = 4]
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "mediaLibraries" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager detach
FINE: Detaching object from persistence : "com.xonami.rest.db.payment.PaymentInfo@6b04d3c8" (depth=2)
Jun 17, 2013 11:54:00 AM org.datanucleus.state.LifeCycleState changeState
FINE: Object "com.xonami.rest.db.payment.PaymentInfo@6b04d3c8" (id="com.xonami.rest.db.payment.PaymentInfo:51bf3116b306d15598ec06c7") has a lifecycle change : "P_NONTRANS"->"DETACHED_CLEAN"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager disconnect
FINE: Disconnecting com.xonami.rest.db.payment.PaymentInfo@6b04d3c8 from StateManager[pc=com.xonami.rest.db.payment.PaymentInfo@6b04d3c8, lifecycle=DETACHED_CLEAN]
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl removeObjectFromLevel1Cache
FINE: Object with id="com.xonami.rest.db.payment.PaymentInfo:51bf3116b306d15598ec06c7" being removed from Level 1 cache [current cache size = 3]
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "paymentInfos" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "projectLibraries" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "propertyKeys" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "propertyValues" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "searchList" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager unwrapSCOField
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") is having the SCO wrapper in field "tags" replaced by the unwrapped value
Jun 17, 2013 11:54:00 AM org.datanucleus.state.LifeCycleState changeState
FINE: Object "com.xonami.rest.db.XonamiUser@397b6178" (id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5") has a lifecycle change : "P_NONTRANS"->"DETACHED_CLEAN"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager disconnect
FINE: Disconnecting com.xonami.rest.db.XonamiUser@397b6178 from StateManager[pc=com.xonami.rest.db.XonamiUser@397b6178, lifecycle=DETACHED_CLEAN]
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl removeObjectFromLevel1Cache
FINE: Object with id="com.xonami.rest.db.XonamiUser:8f677878-ebde-4774-9604-5f78ba4844a5" being removed from Level 1 cache [current cache size = 2]
Jun 17, 2013 11:54:00 AM org.datanucleus.state.LifeCycleState changeState
FINE: Object "com.xonami.rest.db.ProjectLibrary@9ec265c" (id="com.xonami.rest.db.ProjectLibrary:51bf3116b306d15598ec06c5") has a lifecycle change : "P_NONTRANS"->"DETACHED_CLEAN"
Jun 17, 2013 11:54:00 AM org.datanucleus.state.JDOStateManager disconnect
FINE: Disconnecting com.xonami.rest.db.ProjectLibrary@9ec265c from StateManager[pc=com.xonami.rest.db.ProjectLibrary@9ec265c, lifecycle=DETACHED_CLEAN]
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl removeObjectFromLevel1Cache
FINE: Object with id="com.xonami.rest.db.ProjectLibrary:51bf3116b306d15598ec06c5" being removed from Level 1 cache [current cache size = 1]
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl performDetachOnClose
FINE: DetachOnClose : completed detach
Jun 17, 2013 11:54:00 AM org.datanucleus.store.connection.ConnectionManagerImpl closeAllConnections
FINE: Connection found in the pool : org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=com.mongodb.DBApiLayer@61ffbcb, commitOnRelease=true, closeOnRelease=false, closeOnTxnEnd=false] for key=org.datanucleus.ExecutionContextImpl@519549e in factory=ConnectionFactory:tx[org.datanucleus.store.mongodb.ConnectionFactoryImpl@4fb7a553] but owner object closing so closing connection
Jun 17, 2013 11:54:00 AM org.datanucleus.store.connection.ConnectionManagerImpl$1 managedConnectionPostClose
FINE: Connection removed from the pool : org.datanucleus.store.mongodb.ConnectionFactoryImpl$ManagedConnectionImpl@517c804b [conn=com.mongodb.DBApiLayer@61ffbcb, commitOnRelease=true, closeOnRelease=false, closeOnTxnEnd=false] for key=org.datanucleus.ExecutionContextImpl@519549e in factory=ConnectionFactory:tx[org.datanucleus.store.mongodb.ConnectionFactoryImpl@4fb7a553]
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl disconnectObjectProvidersFromCache
FINE: Level 1 Cache cleared
Jun 17, 2013 11:54:00 AM org.datanucleus.ExecutionContextImpl close
FINE: ExecutionContext "org.datanucleus.ExecutionContextImpl@519549e" closed
Jun 17, 2013 11:54:00 AM org.restlet.service.ConverterService toRepresentation

1 个答案:

答案 0 :(得分:0)

  

FINE:要在数据存储区中完全评估的过滤器的编译   是不可能的:此映射器不支持调用表达式

因此目前尚未实现将JPQL“collField.contains(val)”(相当于您为查询输入的内容)转换为MongoDB查询,因此无法在数据存储区中对其进行评估。由于您知道需要转换为什么内容,因此您可以轻松获得the code for the DataNucleus MongoDB plugin并找到class QueryToMongoDBMapper并为该特定查询提供支持。