With new orient api (unified document and graph api), graph pools remains for legacy thinkerpop 2 only
orientdb-object and orientdb-graph dependencies become optional (no more exclusions, directly specify required libs instead)
OrientModule:
As before, single uri passed which includes both system path (plocal) and db name
Internally, it splits to create OrientDB object and open db connections with db name (new api)
Provider may be injected now to manually open connections (OrientDB object is a new api object used for orient connections (or pools) creation)
OrientDBFactory bean may be injected to get access to database configuration (url, user, etc.)
Before this information was bound with guice constants
New option autoCreateRemoteDatabase(user, pass, type) is available to automatically create rmote databases (mainly for tests)
New option withConfig(conf) allows specifying custom config for OrientDB object (by default, OrientDBConfig.defaultConfig() used)
Remote database creation indirect configuration support for tests (instead of direct config in module):
OrientDBFactory.enableAutoCreationRemoteDatabase(user, pass, type)
OrientDBFactory.disableAutoCreationRemoteDatabase()
Pools contract changed: PoolManager.start(String) now accepts database name instead of complete url
DocumentPool:
Now use new ODatabasePool pool implementation (instead of OPartitionedDatabasePoolFactory)
Removed pool recovery logic (since 1.x: when pool failed to provide correct connection it was re-created).
Assuming new pool is more stable.
Different user credentials (UserManager.executeWithUser) will create separate connection outside the pool.
Object api now may be used to properly remove graph nodes with edges (because graph consistency is on document level now)
Fix ignoreNullValues flag support for @Index and @CompositeIndex scheme extensions (#16)
(breaking) since orient 2.2 ignoreNullValues is false by default, but @Index and @CompositeIndex annotations
use ignoreNullValues = true by default and it was not applied properly before. Now flag will apply properly,
which may change existing indexes. One consequence I know is composite index with ignoreNullValues = true is not
used for single field searches (don't know why).
Support custom types installation
with new method: OrientModule#withCustomTypes(OObjectSerializer...) (#14)
Support external connection (thread bound) re-use: when transaction started with TxConfig.external() thread bound
connection used instead of new connection. Commits and rollbacks are not applied automatically: supposed that manual
connection is completely managed externally. Useful in case when already existing connection must be (re)used in guice.
(breaking) custom TransactionManager and/or PoolManager implementations must be updated to support external transactions
New service RecordConverter may be used directly to:
(breaking) no longer could be used with @Query (because it does not work properly for remote connection and not guaranteed by the documentation)
wraps provided listener with an external transaction (thread bound connection (used by orient) could be used in guice)
AsyncQuery changes:
custom AsyncQueryListener interface can be used instead of OCommandResultListener to apply automatic result conversion
(with RecordConverter to mimic the same behaviour as for usual method result)
new blocking attribute to switch execution into non blocking mode (OSQLNonBlockingQuery).
Non blocking methods may return Future to monitor async execution (but not able to cancel!).
exception appeared inside async listener is intercepted and logged but not propagated:
only false returned to stop query processing. This is required for proper orient connection handling
(it does not expect exceptions in some modes)
required orient OLiveResultListener parameter must be used with @Listen annotation
custom LiveQueryListener interface can be used instead of OLiveResultListener to apply automatic result conversion
(with RecordConverter to mimic the same behaviour as for usual method result).
Support repository result projection on collections (e.g. @Query("select name from Model") List\ select()).
Avoid deprecated OCommandRequest api usage (deprecated in 2.1):
@FetchPlan, @Limit and @Timeout extensions now modifies query instead of using OCommandRequest setters
(behavior change) @EdgeType and @VertexType extensions now assign superclass directly to annotated type (or not if hierarchy already contains required type)
Call activateOnCurrentThread() in pools for each connection obtain (e.g. context.getConnection()) to guarantee proper db instance bound to thread
Fix guice circular proxy (between transaction manager and pools)
Fix child injector and private modules support for RepositoryModule (#7)
Add @RidElVar parameter extension to bind rid directly into query from any source (string, object, document, vertex or collections).
Add @CaseInsensitive scheme field extension: sets collate ci for case insensitive fields comparison in queries. Also should be used for creation of ci indexes.
Add ignoreNullValues option support for @Index and @CompositeIndex scheme extensions
Add @FulltextIndex scheme field extension for fulltext index definitions
Add @LuceneIndex and @CompositeLuceneIndex scheme extensions for fulltext lucene index definitions
Fix modules usage in child injector
Improve connection hint support in repository annotations: now hint is always used in priority, which allows to write more complex result converters
Add ObjectVertexCrud mixin to correctly work with vertexes from object api
Add EdgesSupport and EdgeTypeSupport mixins to simplify work with edges using object api
Fix temporal id problem for detached objects (affects ObjectCrud, ObjectVertexCrud and @DetachResult)
ObjectCrud: add getAllAsList, objectToDocument and documentToObject methods
DocumentPool use OPartitionedDatabasePool instead of deprecated ODatabaseDocumentPool
(breaking) Default pools implementation now rely on document pool only (no more separate transactions for each type).
This allows using all connection types in one transaction and all changes will be visible to each type.
(breaking) Connection initialization moved from DatabaseManager to pool implementation (graph and object
connections update scheme on first connection). Now each pool did db connection on startup to check connection and
let orient properly update scheme on start.
(breaking) TxTemplate and SpecificTxTemplate now propagate only runtime exceptions and wrap checked exceptions
into runtime. This simplifies general usage (most orient exceptions are runtime)
ObjectCrudMixin: added multiple detachAll methods (in orient 2 object proxies doesn't work outside of transaction,
so detaching is more important)
DocumentCrudMixin: added create method to create document inside of transaction (in orient 2 it's now impossible to
create document outside of transaction, but document changes doesn't require ongoing transaction)
Add PersistentContext class, which combines connection provider, both templates and provide access to
TransactionManager. It should be used instead of low level staff (simplifies usage)
Remove deprecated finders auto scanning
(breaking) Finders rewritten to extensions based architecture. Finder module renamed to repository to follow spring-data
style (as well known and very similar realization). Not owned annotations (@Named, @Finder, @FirstResult, @MaxResults)
replaced with spring-data like or orient specific annotations (@Param, @Query, @Function, @Skip, @Limit).
Many annotations and classes renamed due to module rename.
Many new repository features
Ability to change user inside transaction (for example for security checks).
Retry annotation to catch ONeedRetryException and re-execute method.
(breaking) schemeMappingPackage option removed from OrientModule. Shortcut modules now must be used together with
OrientModule and not substitute it. Modules renamed to AutoScanSchemeModule and PackageSchemeModule.
Model class to scheme mapper, using orient default mapper, but with extensions support (custom annotations).
AbstractObjectInitializer now generic enough to use for custom classpath filtering method.
Finders now managed by guice and any additional aop could be applied. Abstract beans could define finder methods.
(integration implemented in external library)
Finders auto scan api deprecated: now finder bean could be marked with @ProvidedBy and rely on guice JIT resolution
Fix transactional aop warnings on jdk8
Fix finder descriptors cache
Add ability to disable finder descriptors cache using property and method to clear current cache
Support different users (for example, to init schema with more powerful user and to use orient security model). Breaks pools api compatibility
AutoScanFinderModule accept multiple packages for scanning
Add document and vertex projection for single field (works for plain and array result): useful for count (or other aggregation functions) or selecting single field
Support inheritance for finder beans and interfaces (mixins) and generics recognition through all hierarchy
Support generic type query placeholders (finder class generic used as query placeholder)