I have 2 entities (Category and Products) having one to many relationship between them. My architecture is having Spring (in business Layer) and am using Hibernate under the hood of JPA. I am using annotations for all my configurations. Please see the attached code.
Inside the finder method of a DAO, I am finding (EntityManager.find()) the parent entity. The problem is that the child property of this parent (which is a collection of type ArrayList) is actually returned as PersistentBag.
What should I do so that the getter method of my parent will return me collection of type ArrayList?
Do anyone has any idea?