Thanks for following up on this.
2013/12/3 Emmanuel Bernard <emmanuel(a)hibernate.org>
We probably need to revisit what we really want to test and adjust
test accordingly. AFAIR, these tests felt weak anyways.
Yes, that has been on my agenda for some day anyways. Test failures are
hard to analyze as the assertion methods don't reveal the actual vs.
expected association count, so one always needs to debug.
To move forward I'm just working around the issue by considering all
CouchDB entity-substructures as associations in the test. This seems good
enough for the time being as the assertion method in question is never used
for cases with actual embeddables.
We can then improve the tests/assertions in a next step.
On Fri 2013-11-29 11:49, Gunnar Morling wrote:
> I'm working on support for embedded associations in CouchDB . Checking
> how this is mapped by the MongoDB dialect I saw its done like this (here
> with an order column):
> "_id": "123",
> "orderedChildren": [
> "birthorder": 0,
> "orderedChildren_id": "456"
> "birthorder": 1,
> "orderedChildren_id": "789"
> Just looking at this document one can't tell whether
> actually represents an association or an embedded collection. For our
> engine that's no problem as it knows the kind of the element from its
> We have a testing approach though which makes assertions on the number of
> associations stored in the database. With the representation described
> above the number of embedded associations can't be determined on the
> server-side alone (using a "view" in CouchDB terms).
> Besides from adding an attribute which describes the kind of a collection
> (which wouldn't be so nice as it was just for testing purposes), I don't
> see any other way than obtaining all the candidates and single out actual
> associations on the client based on the meta-model.
> Maybe anyone has a better idea?
> Btw. for MongoDB the problem is ignored by having the assertion method
> always return true in this case.
>  https://hibernate.atlassian.net/browse/OGM-389
> hibernate-dev mailing list