Package dev.morphia
Interface AdvancedDatastore
-
- All Superinterfaces:
Datastore
- All Known Implementing Classes:
DatastoreImpl
public interface AdvancedDatastore extends Datastore
This interface exposes advancedDatastore
features, like interacting with DBObject and low-level options. It implements matching methods from theDatastore
interface but with a specified kind (collection name), or raw types (DBObject).- Author:
- ScottHernandez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description AggregationPipeline
createAggregation(java.lang.String collection, java.lang.Class<?> clazz)
Returns anAggregationPipeline
bound to the given collection and class.<T> Query<T>
createQuery(java.lang.Class<T> clazz, com.mongodb.DBObject q)
<T> Query<T>
createQuery(java.lang.String collection, java.lang.Class<T> clazz)
Deprecated.this feature is being removed.<T> Query<T>
createQuery(java.lang.String collection, java.lang.Class<T> clazz, com.mongodb.DBObject q)
Deprecated.this feature is being removed.<T,V>
com.mongodb.DBRefcreateRef(java.lang.Class<T> clazz, V id)
Creates a reference to the entity (using the current DB -can be null-, the collectionName, and id)<T> com.mongodb.DBRef
createRef(T entity)
Creates a reference to the entity (using the current DB -can be null-, the collectionName, and id)<T> UpdateOperations<T>
createUpdateOperations(java.lang.Class<T> type, com.mongodb.DBObject ops)
Creates an UpdateOperations instance for the given type.<T,V>
com.mongodb.WriteResultdelete(java.lang.String kind, java.lang.Class<T> clazz, V id)
Deprecated.usefind(String, Class)
andDatastore.delete(Query)
instead<T,V>
com.mongodb.WriteResultdelete(java.lang.String kind, java.lang.Class<T> clazz, V id, com.mongodb.WriteConcern wc)
Deprecated.usefind(String, Class)
andDatastore.delete(Query, DeleteOptions)
instead<T,V>
com.mongodb.WriteResultdelete(java.lang.String kind, java.lang.Class<T> clazz, V id, DeleteOptions options)
Deprecated.usefind(String, Class)
andDatastore.delete(Query, DeleteOptions)
instead<T> void
ensureIndex(java.lang.String collection, java.lang.Class<T> clazz, java.lang.String fields)
Deprecated.This method uses the legacy approach for defining indexes.<T> void
ensureIndex(java.lang.String collection, java.lang.Class<T> clazz, java.lang.String name, java.lang.String fields, boolean unique, boolean dropDupsOnCreate)
Deprecated.This method uses the legacy approach for defining indexes.<T> void
ensureIndexes(java.lang.String collection, java.lang.Class<T> clazz)
Deprecated.this feature is being removed.<T> void
ensureIndexes(java.lang.String collection, java.lang.Class<T> clazz, boolean background)
Deprecated.useensureIndexes(String, Class)
instead and specify background true or false in the annotationsKey<?>
exists(java.lang.Object keyOrEntity, com.mongodb.ReadPreference readPreference)
Deprecated.useMongoIterable.first()
instead<T> Query<T>
find(java.lang.String collection, java.lang.Class<T> clazz)
Deprecated.this feature is being removed.<T,V>
Query<T>find(java.lang.String collection, java.lang.Class<T> clazz, java.lang.String property, V value, int offset, int size)
Deprecated.usefind(String, Class)
and apply the options to thecom.mongodb.client.model.FindOptions
parameter<T> T
get(java.lang.Class<T> clazz, com.mongodb.DBRef ref)
Deprecated.useDatastore.find(Class)
instead<T,V>
Tget(java.lang.String collection, java.lang.Class<T> clazz, V id)
Deprecated.usefind(String, Class)
insteadlong
getCount(java.lang.String collection)
Deprecated.useQuery.count()
insteadcom.mongodb.DBDecoderFactory
getDecoderFact()
Deprecated.unused in 2.0 and will be removed<T> java.lang.Iterable<Key<T>>
insert(java.lang.Iterable<T> entities)
Deprecated.useinsert(List)
<T> java.lang.Iterable<Key<T>>
insert(java.lang.Iterable<T> entities, com.mongodb.WriteConcern wc)
Deprecated.<T> java.lang.Iterable<Key<T>>
insert(java.lang.Iterable<T> entities, InsertOptions options)
Deprecated.<T> java.lang.Iterable<Key<T>>
insert(java.lang.String collection, java.lang.Iterable<T> entities)
Deprecated.this feature is being removed.<T> java.lang.Iterable<Key<T>>
insert(java.lang.String collection, java.lang.Iterable<T> entities, com.mongodb.WriteConcern wc)
Deprecated.useinsert(String, Iterable, InsertOptions)
instead<T> java.lang.Iterable<Key<T>>
insert(java.lang.String collection, java.lang.Iterable<T> entities, InsertOptions options)
Deprecated.this feature is being removed.<T> Key<T>
insert(java.lang.String collection, T entity)
Deprecated.this feature is being removed.<T> Key<T>
insert(java.lang.String collection, T entity, InsertOptions options)
Deprecated.this feature is being removed.<T> java.lang.Iterable<Key<T>>
insert(java.util.List<T> entities)
Inserts entities in to the mapped collection.<T> java.lang.Iterable<Key<T>>
insert(java.util.List<T> entities, InsertOptions options)
Inserts entities in to the mapped collection.<T> Key<T>
insert(T entity)
Inserts an entity in to the mapped collection.<T> java.lang.Iterable<Key<T>>
insert(T... entities)
Deprecated.useinsert(Iterable)
instead<T> Key<T>
insert(T entity, com.mongodb.WriteConcern wc)
Deprecated.<T> Key<T>
insert(T entity, InsertOptions options)
Inserts an entity in to the mapped collection.<T> Query<T>
queryByExample(java.lang.String collection, T example)
Returns a new query based on the example object<T> Key<T>
save(java.lang.String collection, T entity)
Deprecated.this feature is being removed.<T> Key<T>
save(java.lang.String collection, T entity, com.mongodb.WriteConcern wc)
Deprecated.usesave(String, Object, InsertOptions)
instead<T> Key<T>
save(java.lang.String collection, T entity, InsertOptions options)
Deprecated.this feature is being removed.void
setDecoderFact(com.mongodb.DBDecoderFactory fact)
Deprecated.unused in 2.0 and will be removed-
Methods inherited from interface dev.morphia.Datastore
createAggregation, createQuery, createUpdateOperations, delete, delete, delete, delete, delete, delete, delete, delete, delete, delete, enableDocumentValidation, ensureCaps, ensureIndex, ensureIndex, ensureIndexes, ensureIndexes, ensureIndexes, ensureIndexes, exists, find, find, find, findAndDelete, findAndDelete, findAndModify, findAndModify, findAndModify, findAndModify, get, get, get, getByKey, getByKeys, getByKeys, getCollection, getCount, getCount, getCount, getCount, getDatabase, getDB, getDefaultWriteConcern, getKey, getMapper, getMongo, getQueryFactory, mapReduce, mapReduce, mapReduce, merge, merge, queryByExample, save, save, save, save, save, save, save, setDefaultWriteConcern, setQueryFactory, update, update, update, update, update, update, updateFirst, updateFirst, updateFirst, updateFirst
-
-
-
-
Method Detail
-
getDecoderFact
@Deprecated com.mongodb.DBDecoderFactory getDecoderFact()
Deprecated.unused in 2.0 and will be removedReturns the DBDecoderFactory used by this Datastore- Returns:
- the decoder factory
- See Also:
DBDecoderFactory
Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
setDecoderFact
@Deprecated void setDecoderFact(com.mongodb.DBDecoderFactory fact)
Deprecated.unused in 2.0 and will be removedSets the DBDecoderFactory to use in this Datastore- Parameters:
fact
- the DBDecoderFactory to use
Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
createAggregation
AggregationPipeline createAggregation(java.lang.String collection, java.lang.Class<?> clazz)
Returns anAggregationPipeline
bound to the given collection and class.- Parameters:
collection
- the collection to queryclazz
- The class to create aggregation against- Returns:
- the aggregation pipeline
-
createQuery
@Deprecated <T> Query<T> createQuery(java.lang.String collection, java.lang.Class<T> clazz)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331- Type Parameters:
T
- The type of the entity- Parameters:
collection
- the collection to queryclazz
- the class of objects to be returned- Returns:
- Query for the specified class clazz
-
createQuery
<T> Query<T> createQuery(java.lang.Class<T> clazz, com.mongodb.DBObject q)
- Type Parameters:
T
- The type of the entity- Parameters:
clazz
- the class of objects to be returnedq
- the query which will be passed to aQueryFactory
- Returns:
- Query for the specified class clazz
-
createQuery
@Deprecated <T> Query<T> createQuery(java.lang.String collection, java.lang.Class<T> clazz, com.mongodb.DBObject q)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331- Type Parameters:
T
- The type of the entity- Parameters:
collection
- the collection to queryclazz
- the class of objects to be returnedq
- the query which will be passed to aQueryFactory
- Returns:
- Query for the specified class clazz
-
createRef
<T,V> com.mongodb.DBRef createRef(java.lang.Class<T> clazz, V id)
Creates a reference to the entity (using the current DB -can be null-, the collectionName, and id)- Type Parameters:
T
- The type of the entityV
- The type of the ID value- Parameters:
clazz
- The type of the entityid
- The ID value of the entity- Returns:
- the DBRef for the entity
-
createRef
<T> com.mongodb.DBRef createRef(T entity)
Creates a reference to the entity (using the current DB -can be null-, the collectionName, and id)- Type Parameters:
T
- The type of the entity- Parameters:
entity
- the entity to create a DBRef for- Returns:
- the DBRef for the entity
-
createUpdateOperations
<T> UpdateOperations<T> createUpdateOperations(java.lang.Class<T> type, com.mongodb.DBObject ops)
Creates an UpdateOperations instance for the given type.- Type Parameters:
T
- The type of the entity- Parameters:
type
- The type of the entityops
- The operations to perform- Returns:
- the UpdateOperations instance
-
delete
@Deprecated <T,V> com.mongodb.WriteResult delete(java.lang.String kind, java.lang.Class<T> clazz, V id)
Deprecated.usefind(String, Class)
andDatastore.delete(Query)
insteadDeletes an entity of the given type T, with the givenid
, from the collection with the name in thekind
param. Validates theid
, checking it's the correct type for an ID for entities of typeT
. The entity typeclazz
is used only for validation, not for filtering, therefore if you have entities of different types in the same collection (kind
), this method will delete any entity with the givenid
, regardless of its type.- Type Parameters:
T
- the entity typeV
- is the type of the ID, for example ObjectId- Parameters:
kind
- the collection nameclazz
- the Class of the entity to deleteid
- the value of the ID- Returns:
- the result of this delete operation.
Developer note. Inline this method to update to the new usage
-
delete
@Deprecated <T,V> com.mongodb.WriteResult delete(java.lang.String kind, java.lang.Class<T> clazz, V id, DeleteOptions options)
Deprecated.usefind(String, Class)
andDatastore.delete(Query, DeleteOptions)
insteadDeletes an entity of the given type T, with the givenid
, from the collection with the name in thekind
param. Validates theid
, checking it's the correct type for an ID for entities of typeT
. The entity typeclazz
is used only for validation, not for filtering, therefore if you have entities of different types in the same collection (kind
), this method will delete any entity with the givenid
, regardless of its type.- Type Parameters:
T
- the entity typeV
- is the type of the ID, for example ObjectId- Parameters:
kind
- the collection nameclazz
- the Class of the entity to deleteid
- the value of the IDoptions
- the options to use when deleting- Returns:
- the result of this delete operation.
- Since:
- 1.3
Developer note. Inline this method to update to the new usage
-
delete
@Deprecated <T,V> com.mongodb.WriteResult delete(java.lang.String kind, java.lang.Class<T> clazz, V id, com.mongodb.WriteConcern wc)
Deprecated.usefind(String, Class)
andDatastore.delete(Query, DeleteOptions)
insteadDeletes an entity of the given type T, with the givenid
, from the collection with the name in thekind
param. Validates theid
, checking it's the correct type for an ID for entities of typeT
. The entity typeclazz
is used only for validation, not for filtering, therefore if you have entities of different types in the same collection (kind
), this method will delete any entity with the givenid
, regardless of its type.- Type Parameters:
T
- the entity typeV
- is the type of the ID, for example ObjectId- Parameters:
kind
- the collection nameclazz
- the Class of the entity to deleteid
- the value of the IDwc
- the WriteConcern for this operation- Returns:
- the result of this delete operation.
-
ensureIndex
@Deprecated <T> void ensureIndex(java.lang.String collection, java.lang.Class<T> clazz, java.lang.String fields)
Deprecated.This method uses the legacy approach for defining indexes. Switch to using annotations on entity classes or the methods in the Java driver itself.Ensures (creating if necessary) the index including the field(s) + directions on the given collection name; eg fields = "field1, -field2" ({field1:1, field2:-1})- Type Parameters:
T
- the type to index- Parameters:
collection
- the collection to updateclazz
- the class from which to get the index definitionsfields
- the fields to index- See Also:
MongoCollection.createIndex(org.bson.conversions.Bson, com.mongodb.client.model.IndexOptions)
,ensureIndexes(String, Class)
-
ensureIndex
@Deprecated <T> void ensureIndex(java.lang.String collection, java.lang.Class<T> clazz, java.lang.String name, java.lang.String fields, boolean unique, boolean dropDupsOnCreate)
Deprecated.This method uses the legacy approach for defining indexes. Switch to using annotations on entity classes or the methods in the Java driver itself.Ensures (creating if necessary) the index including the field(s) + directions on the given collection name; eg fields = "field1, -field2" ({field1:1, field2:-1})- Type Parameters:
T
- the type to index- Parameters:
collection
- the collection to updateclazz
- the class from which to get the index definitionsname
- the name of the index to createfields
- the fields to indexunique
- true if the index should enforce uniqueness on the fields indexeddropDupsOnCreate
- This value is no longer supported. Tells the unique index to drop duplicates silently when creating; only the first will be kept- See Also:
MongoCollection.createIndex(org.bson.conversions.Bson, com.mongodb.client.model.IndexOptions)
,ensureIndexes(String, Class)
-
ensureIndexes
@Deprecated <T> void ensureIndexes(java.lang.String collection, java.lang.Class<T> clazz)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331Ensures (creating if necessary) the indexes found during class mapping (using@Indexed, @Indexes)
on the given collection name.- Type Parameters:
T
- the type to index- Parameters:
collection
- the collection to updateclazz
- the class from which to get the index definitions
-
ensureIndexes
@Deprecated <T> void ensureIndexes(java.lang.String collection, java.lang.Class<T> clazz, boolean background)
Deprecated.useensureIndexes(String, Class)
instead and specify background true or false in the annotationsEnsures (creating if necessary) the indexes found during class mapping (using@Indexed, @Indexes)
on the given collection name, possibly in the background- Type Parameters:
T
- the type to index- Parameters:
collection
- the collection to updateclazz
- the class from which to get the index definitionsbackground
- if true, the index will be built in the background. If false, the method will block until the index is created.
-
exists
@Deprecated Key<?> exists(java.lang.Object keyOrEntity, com.mongodb.ReadPreference readPreference)
Deprecated.useMongoIterable.first()
insteadChecks that an entity exists for the given key or entity- Parameters:
keyOrEntity
- the value to check forreadPreference
- Uses the supplied ReadPreference for the check. If readPreference is null the preference is taken from the annotation or uses the default preference.- Returns:
- the key if the entity exists
- See Also:
Datastore.exists(Object)
Developer note. Inline this method to update to the new usage
-
find
@Deprecated <T> Query<T> find(java.lang.String collection, java.lang.Class<T> clazz)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331Find all instances by type in a different collection than what is mapped on the class given.- Type Parameters:
T
- the type to query- Parameters:
collection
- the collection to query againstclazz
- the class to use for mapping the results- Returns:
- the query
-
find
@Deprecated <T,V> Query<T> find(java.lang.String collection, java.lang.Class<T> clazz, java.lang.String property, V value, int offset, int size)
Deprecated.usefind(String, Class)
and apply the options to thecom.mongodb.client.model.FindOptions
parameterFind all instances by type in a different collection than what is mapped on the class given skipping some documents and returning a fixed number of the remaining.- Type Parameters:
T
- the type to queryV
- the type to filter value- Parameters:
collection
- the collection to query againstclazz
- the class to use for mapping the resultsproperty
- the document property to query againstvalue
- the value to check foroffset
- the number of results to skipsize
- the maximum number of results to return- Returns:
- the query
Developer note. Inline this method to update to the new usage
-
get
@Deprecated <T> T get(java.lang.Class<T> clazz, com.mongodb.DBRef ref)
Deprecated.useDatastore.find(Class)
insteadFind the given entity (by collectionName/id);- Type Parameters:
T
- the type to fetch- Parameters:
clazz
- the class to use for mappingref
- the DBRef to use when querying- Returns:
- the entity referenced in the DBRef. May be null.
Developer note. Inline this method to update to the new usage
-
get
@Deprecated <T,V> T get(java.lang.String collection, java.lang.Class<T> clazz, V id)
Deprecated.usefind(String, Class)
insteadFinds an entity in the named collection whose id matches the value given.- Type Parameters:
T
- the type to fetchV
- the type of the ID- Parameters:
collection
- the collection to queryclazz
- the class to use for mappingid
- the ID to query- Returns:
- the entity with the id. May be null.
Developer note. Inline this method to update to the new usage
-
getCount
@Deprecated long getCount(java.lang.String collection)
Deprecated.useQuery.count()
insteadGets the count this collection- Parameters:
collection
- the collection to count- Returns:
- the collection size
Developer note. Inline this method to update to the new usage
-
insert
<T> Key<T> insert(T entity)
Inserts an entity in to the mapped collection. The return type will change in 2.0- Type Parameters:
T
- the type of the entity- Parameters:
entity
- the entity to insert- Returns:
- the new key of the inserted entity
-
insert
@Deprecated <T> Key<T> insert(T entity, com.mongodb.WriteConcern wc)
Deprecated.Inserts an entity in to the mapped collection.- Type Parameters:
T
- the type of the entity- Parameters:
entity
- the entity to insertwc
- the WriteConcern to use when inserting- Returns:
- the new key of the inserted entity
- See Also:
WriteConcern
Developer note. Inline this method to update to the new usage
-
insert
<T> Key<T> insert(T entity, InsertOptions options)
Inserts an entity in to the mapped collection. The return type will change in 2.0- Type Parameters:
T
- the type of the entity- Parameters:
entity
- the entity to insertoptions
- the options to apply to the insert operation- Returns:
- the new key of the inserted entity
- Since:
- 1.3
Developer note. Inline this method to update to the new usage
-
insert
@Deprecated <T> Key<T> insert(java.lang.String collection, T entity)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331Inserts an entity in to the named collection.- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to updateentity
- the entity to insert- Returns:
- the new key of the inserted entity
-
insert
@Deprecated <T> Key<T> insert(java.lang.String collection, T entity, InsertOptions options)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331Inserts an entity in to the named collection.- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to updateentity
- the entity to insertoptions
- the options to apply to the insert operation- Returns:
- the new key of the inserted entity
- Since:
- 1.3
Developer note. Inline this method to update to the new usage
-
insert
@Deprecated <T> java.lang.Iterable<Key<T>> insert(T... entities)
Deprecated.useinsert(Iterable)
insteadInserts entities in to the mapped collection.- Type Parameters:
T
- the type of the entity- Parameters:
entities
- the entities to insert- Returns:
- the new keys of the inserted entities
Developer note. Inline this method to update to the new usage
-
insert
@Deprecated <T> java.lang.Iterable<Key<T>> insert(java.lang.Iterable<T> entities)
Deprecated.useinsert(List)
Inserts entities in to the mapped collection. The return type will change in 2.0- Type Parameters:
T
- the type of the entities- Parameters:
entities
- the entities to insert- Returns:
- the new keys of the inserted entities
-
insert
<T> java.lang.Iterable<Key<T>> insert(java.util.List<T> entities)
Inserts entities in to the mapped collection. The return type will change in 2.0- Type Parameters:
T
- the type of the entities- Parameters:
entities
- the entities to insert- Returns:
- the new keys of the inserted entities
- Since:
- 1.6
-
insert
@Deprecated <T> java.lang.Iterable<Key<T>> insert(java.lang.Iterable<T> entities, com.mongodb.WriteConcern wc)
Deprecated.Inserts entities in to the mapped collection.- Type Parameters:
T
- the type of the entity- Parameters:
entities
- the entities to insertwc
- the WriteConcern to use when inserting- Returns:
- the new keys of the inserted entities
-
insert
@Deprecated <T> java.lang.Iterable<Key<T>> insert(java.lang.Iterable<T> entities, InsertOptions options)
Deprecated.Inserts entities in to the mapped collection. The return type will change in 2.0- Type Parameters:
T
- the type of the entity- Parameters:
entities
- the entities to insertoptions
- the options to apply to the insert operation- Returns:
- the new keys of the inserted entities
- Since:
- 1.3
-
insert
<T> java.lang.Iterable<Key<T>> insert(java.util.List<T> entities, InsertOptions options)
Inserts entities in to the mapped collection. The return type will change in 2.0- Type Parameters:
T
- the type of the entity- Parameters:
entities
- the entities to insertoptions
- the options to apply to the insert operation- Returns:
- the new keys of the inserted entities
- Since:
- 1.6
-
insert
@Deprecated <T> java.lang.Iterable<Key<T>> insert(java.lang.String collection, java.lang.Iterable<T> entities)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331Inserts an entity in to the named collection.- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to updateentities
- the entities to insert- Returns:
- the new keys of the inserted entities
-
insert
@Deprecated <T> java.lang.Iterable<Key<T>> insert(java.lang.String collection, java.lang.Iterable<T> entities, com.mongodb.WriteConcern wc)
Deprecated.useinsert(String, Iterable, InsertOptions)
insteadInserts an entity in to the named collection.- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to updateentities
- the entities to insertwc
- the WriteConcern to use when inserting- Returns:
- the new keys of the inserted entities
- See Also:
WriteConcern
-
insert
@Deprecated <T> java.lang.Iterable<Key<T>> insert(java.lang.String collection, java.lang.Iterable<T> entities, InsertOptions options)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331Inserts entities in to the named collection.- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to updateentities
- the entities to insertoptions
- the options to apply to the insert operation- Returns:
- the new keys of the inserted entities
- Since:
- 1.3
-
queryByExample
<T> Query<T> queryByExample(java.lang.String collection, T example)
Returns a new query based on the example object- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to queryexample
- the example entity to use when building the query- Returns:
- the query
-
save
@Deprecated <T> Key<T> save(java.lang.String collection, T entity)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331Saves an entity in to the named collection.- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to updateentity
- the entity to save- Returns:
- the new key of the inserted entity
-
save
@Deprecated <T> Key<T> save(java.lang.String collection, T entity, com.mongodb.WriteConcern wc)
Deprecated.usesave(String, Object, InsertOptions)
insteadSaves an entity in to the named collection.- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to updateentity
- the entity to savewc
- the WriteConcern to use when inserting- Returns:
- the new key of the inserted entity
-
save
@Deprecated <T> Key<T> save(java.lang.String collection, T entity, InsertOptions options)
Deprecated.this feature is being removed. no replacement is planned. see issue #1331Saves an entity in to the named collection.- Type Parameters:
T
- the type of the entity- Parameters:
collection
- the collection to updateentity
- the entity to saveoptions
- the options to apply to the save operation- Returns:
- the new key of the inserted entity
-
-