Open issues

Ignite dialect creates QueryEntity types as Ignite UUIDs
OGM-1509
Improve GridDialectOperationInvocationsTest for associations
OGM-1152
Use transactions over Hot Rod
OGM-1335
Add necessary hook in Hibernate ORM to customize when / if / how SchemaExport is called
OGM-741
Make sure all writes/reads of a session target the same replica in MongoDB
OGM-464
Add support for HAVING clause for MongoDB
OGM-1561
Lazy startup mongodb datastore provider
OGM-1560
building from git on Windows 10, stopped on Hibernate OGM for MongoDB test
OGM-1559
When a mapping requires a discriminator column an index should be created for that column
OGM-1556
MongoSocketReadException when used Hibernate OGM with cloud MongoDB Atlas
OGM-1555
Add support for mongodb 4.0 transaction feature
OGM-1554
GridFS doesn't work when used in an associations
OGM-1553
NullPointerException when retrieving data for entity with InheritanceType.SINGLE_TABLE on Neo4j
OGM-1552
Inheritance Issue
OGM-1547
Add demo project to the main repository
OGM-1546
Add test to check thread safety of the Parboiled parser for native query
OGM-1545
Associations cannot store duplicates without using @OrderColumn
OGM-1537
Split the corrent BOM in smaller ones specific for each modules
OGM-1524
Update MongoDb integration tests running mechanism
OGM-1498
Support running MongoDb integration tests in IDE
OGM-1497
In Neo4j, maps temporal types using the new temporal native types
OGM-1492
Hibernate OGM Test Suite module
OGM-1487
Link to the Ickle reference documentation
OGM-1486
Fix some TODOs in OgmEntityPersister
OGM-1467
Add method to print all the elements in the db
OGM-1466
In Neo4j, Map @Column(nullable=false) as a constraint
OGM-1464
Allow user to force local queries on Apache Ignite
OGM-1456
Add tests to probe "managing data" stored procedures
OGM-1452
Support org.hibernate.query.Query#scroll()
OGM-1449
Review Apache Ignite skipped tests
OGM-1447
Convert Apache Ignite Wildfly modules to feature packs
OGM-1446
Update Apache Ignite dialect to version 5.4 SNAPSHOT
OGM-1443
Switch to AssertJ
OGM-1438
Create test case templates
OGM-1435
We should support db.dropDatabase() for MongoDB for native queries
OGM-1432
Nothing found while searching entities throught base class
OGM-1421
Support stored procedures with named parameters in MongoDB
OGM-1417
Infinispan remote need tests for the mapping strategy
OGM-1410
Rename package org.hibernate.ogm.datastore.infinispan to org.hibernate.ogm.datastore.infinispanembedded
OGM-1409
Improve the consistency of property naming in the pom files
OGM-1396
Test behavior with hibernate ORM bytecode enhacements
OGM-1393
Implement using in-memory neo4j for unit testing
OGM-1366
supports ComputeTask calls
OGM-1358
Support queries with distributed-join for Apache Ignite
OGM-1352
Infinispan remote dialect fails to creating OgmEntityPersister for model
OGM-1350
API report for Ehcache
OGM-1337
Broken order of named parameters
OGM-1334
Support ResultTransformer
OGM-1328
Cassandra support, lucene dependencies & Javassist
OGM-1324
Neo4J - http and bolt dialects run into NPE if transactions are disabled
OGM-1322
issue 1 of 347

Ignite dialect creates QueryEntity types as Ignite UUIDs

Description

This affects current master branch, introduced by https://github.com/hibernate/hibernate-ogm-ignite/pull/18/.

In IgniteInitializer, a few special cases are matched and handled. UUID case is missing from those.
https://github.com/hibernate/hibernate-ogm-ignite/blob/master/ignite/src/main/java/org/hibernate/ogm/datastore/ignite/impl/IgniteCacheInitializer.java#L271

In the OGM docs at https://docs.jboss.org/hibernate/ogm/5.4/reference/en-US/html_single/#ogm-mapping-supported-types
It says "UUID stored as described by RFC 4122" which I'm assuming means the string form of the UUID.

I think as a consequence of this, hibernate-ogm-core ends up selecting `StringMappedGridTypeDescriptor` and this does a `toString` on the UUID object before passing it to the underlying store.

Apache Ignite supports UUIDs natively and since the ignite initializer sets the query entity's type to java.util.UUID, Ignite's GridH2RowDescriptor attempts to cast the incoming object to a UUID but this of course has been turned to a string by the StringMappedGridTypeDescriptor.

The end result is a ClassCastException. I don't know the internals of OGM (or OGM-ignite) but from the looks of everything else in that initializer I assumed adding an exception for UUIDs was the way forward.

I'm presuming OGM in general converts the UUID to a string so that there is a consistent representation for UUIDs regardless of the backing store, if so perhaps there's no way to take advantage of Ignite's native UUID support.

I've attached a stacktrace from when this happens and a patch adding the exception I mentioned. Feel free to use/apply it or implement another solution.

Environment

None

Status

Assignee

Unassigned

Reporter

Courtney Robinson

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Priority

Blocker