Hi,
Is it ok to put list or map of embeddable objects in entity? I mean, for example :
@Entity public class Entity_A { (...) @Embedded List<Class_B> bList; @Embedded Map<String, Class_C> cMap; (...) }
where Class_B and Class_C are annotated as @Embeddable ? In the examples, there is only situation where there is one single instance of embeddable class in entity. And what happens if I do operation like :
entA.setBList(new ArrayList<Class_B>())
on an entity that had some Class_B instances in bList? Will they be deleted correctly from database?
And one more question - I have some entities that have my own, serializable classes inside as parameters. When I try to inspect them with explorer, there is an error saying "Failed to deserialize - type X not found". I found an option to put a classpath for persistence objects and metadata, where I put path to jar file containing these classes, but that doesn't help.
Thanks in advance for help.