Open jesse-gallagher opened 2 years ago
At least some of the trouble seems to be due to the fact that both of these documents use the form "Person", and that becomes the identifier for the Entity. While unfortunate, it makes sense that this would be an illegal state, and it'd probably be worth investigating adding another custom annotation to define when the form should be distinct from the entity name.
I think I saw this when the entity name was different, though, so this may also be a problem on its own still.
In the case of the "special annotation to specify the form", it'd probably be good to make that generalizable into specifying a DQL query to limit matched docs. This would allow for different entities to match documents of the same form but with different distinguishing characteristics.
This is something I observed in a side app, and I see it now when working on adding database qualifiers. For example:
and:
Somehow, they will end up both producing the same objects, leading to ClassCastExceptions and mixed data. I don't remember seeing this when I first worked with JNoSQL, so it's possible that it's due to a subsequent change (perhaps caching classes without proper unique keys) or something specific to Domino.