I have not played with case specifically, but it makes sense. ORM tries
hard to never return a null collection reference.
On Wed, Sep 17, 2014 at 10:31 AM, Davide D'Alto <daltodavide(a)gmail.com>
wrote:
Hi,
I've created a test for OGM where we store an @Embeddable containing a list
annotated with @ElementCollection [1]:
This is the embedded:
@Embeddable
public class PhoneNumber {
private String main;
@ElementCollection
private List<String> alternatives;
...
}
In the test [2] I first save an entity with the embedded attribute set to
null and then I call a session.get(...) to obtain it. The embedded
attribute is not null as I was expecting.
The same this happend when I've tried it on ORM, is this the expected
behaviour?
Thanks,
Davide
[1]
https://github.com/hibernate/hibernate-ogm/blob/8a8b29f660973cad4c340931c...
[2]
https://github.com/hibernate/hibernate-ogm/commit/bfed4e2df06f18960502af2...
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev