Releases: xvik/guice-persist-orient
Releases · xvik/guice-persist-orient
4.1.0
4.0.0
- Update to guice 5.0.1
- (breaking) Update to Orient 3.0.38
- Dropped java 1.6 support
- Bound connection objects changed:
- Provider -> Provider
- Provider -> Provider
- 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)
- As before, single uri passed which includes both system path (plocal) and db name
- 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)
- Remove useHashIndex attribute in @FullTextIndex schema annotation
(OClass.INDEX_TYPE.FULLTEXT_HASH_INDEX removed in orient 3.0.38:
orientechnologies/orientdb@bfceffa#diff-3371617e7407306ad4397a0835f64175314b828295d5ad88891c051915d2d8aaL226)
Known issues:
- Repositories continue using DEPRECATED commands api (have no time now to finish rewriting into new api).
Some bugs of object api were fixed with OObjectDatabaseTxFixed (which use fixed commands wrapper: OCommandSQLPojoWrapperFixed)
and ObjectPool would create its instances instead of OObjectDatabaseTx.
- Repositories does not support conversion into new types like OVertex, OEdge (only thinkerpop 2 classes, as before)
or new streams.
- Remote execution of function through object api might return collection of nulls
(special exception will be thrown indicating this case)
- Live query listener unsubscription method may not be called with remote connection
3.3.2
3.3.1
- 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).
3.3.0
- Update to orient 2.2
- 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:
- convert ODocument to object or vertex
- apply default repository method converter (e.g. apply projection)
- @listen parameter extension changes:
- (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)
- custom AsyncQueryListener interface can be used instead of OCommandResultListener to apply automatic result conversion
- Add @livequery repository extension (live queries support)
- 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<String> select()).
Also, many repository usage examples were added to examples repo.
3.2.0
- Update to orient 2.1
- Update to guice 4.1
- 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)
- Fix playframework compatibility (#10)
3.1.1
3.1.0
- 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
3.0.2
- Orient 2.0.9 compatibility: removed @LockStrategy extension, because lock setter removed from OCommandRequest (use sql LOCK statement instead)