-
Defaults to a DB name for authentication of "admin" if nothing specified and username supplied.
-
Creation of a PMF/EMF will create a com.mongodb.MongoClient
. This will be closed then the PMF/EMF is closed.
-
Creation of a PM/EM and performing an operation will obtain a com.mongodb.DB
object from the com.mongodb.MongoClient
.
This is pooled by the MongoClient so is managed by MongoDB. Closing the PM/EM will stop using that com.mongodb.DB
.
-
You can set the number of connections per host with the persistence property datanucleus.mongodb.connectionsPerHost
-
Querying can be performed using JDOQL or JPQL. Some components of a filter are handled in the datastore, and the remainder in-memory.
Currently any expression of a field (in the same table), or a literal are handled in-datastore, as are the operators &&, ||, >, >=, <, ⇐, ==, and !=.
Note that if something falls back to being evaluated in-memory then it can be much slower, and this will be noted in the log, so people are advised to design
their models and queries to avoid that happening if performance is a top priority.
-
If you want a query to be runnable on a slave MongoDB instance then you should set the query extension (JDO) / hint (JPA/Jakarta)
slave-ok as true, and when executed it can be run on a slave instance.
-
All objects of a class are persisted to a particular "document" (specifiable with the "table" in metadata),
and a field of a class is persisted to a particular "field" ("column" in the metadata).
-
Relations : DataNucleus stores the id of the related object(s) in a field of the owning object.
When a relation is bidirectional both ends of the relation will store the relation information.
-
Capped collections : you can specify the extension metadata key mongodb.capped.size
as the number of bytes of the size of the collection for the class in question.
-
If you want to specify the max number of connections per host with MongoDB then set the persistence property datanucleus.mongodb.connectionsPerHost
-
If you want to specify the MongoDB connectTimeout, then set the persistence property datanucleus.mongodb.connectTimeout
-
If you want to specify the MongoDB heartbeatConnectTimeout, then set the persistence property datanucleus.mongodb.heartbeatConnectTimeout
-
If you want to specify the MongoDB heartbeatFrequency, then set the persistence property datanucleus.mongodb.heartbeatFrequency
-
If you want to specify the MongoDB heartbeatSocketTimeout, then set the persistence property datanucleus.mongodb.heartbeatSocketTimeout
-
If you want to specify the MongoDB maxConnectionIdleTime, then set the persistence property datanucleus.mongodb.maxConnectionIdleTime
-
If you want to specify the MongoDB maxConnectionLifeTime, then set the persistence property datanucleus.mongodb.maxConnectionLifeTime
-
If you want to specify the MongoDB maxWaitTime, then set the persistence property datanucleus.mongodb.maxWaitTime
-
If you want to specify the MongoDB minHeartbeatFrequency, then set the persistence property datanucleus.mongodb.minHeartbeatFrequency
-
If you want to specify the MongoDB minConnectionsPerHost, then set the persistence property datanucleus.mongodb.minConnectionsPerHost
-
If you want to specify the MongoDB serverSelectionTimeout, then set the persistence property datanucleus.mongodb.serverSelectionTimeout
-
If you want to specify the MongoDB socketTimeout, then set the persistence property datanucleus.mongodb.socketTimeout
-
If you want to specify the MongoDB socketKeepAlive, then set the persistence property datanucleus.mongodb.socketKeepAlive
-
If you want to specify the MongoDB sslEnabled, then set the persistence property datanucleus.mongodb.sslEnabled
-
If you want to specify the MongoDB sslInvalidHostnameAllowed, then set the persistence property datanucleus.mongodb.sslInvalidHostnameAllowed