attribute « POJO « JPA Q&A





1. Persisting pojo with collection attribute using Hibernate    coderanch.com

Hi, I'm having difficulties understanding how to persist a bean/pojo/class with a collection holding another pojo. How should I go about solving the following example: I have these two entities: @Entity @Table(name="authors") public class Author { private Integer id; private String name; private List bibliography; @Id @GeneratedValue(strategy=GenerationType.AUTO) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = ...

3. non persistent attribute in POJO    forum.hibernate.org

Hi Thanks for replying. Well, I can define a non-persistent field in POJO, however I am using Middlegen to create POJO at build time. Once I define that non-persistent field in POJO, I need to move it into what we call a passive generation area and I will lose active generation of POJO each time I do a build. So, I ...