1. Best place for @Column annotations in Hibernate POJO classes -- variable or method? coderanch.comI have inherited some annotated Hibernate POJO classes in which the @Column annotations are used on the get*() methods. My preference would be for the annotations to be placed on the member variable declarations instead, as this seems more logical and readable. However I am new to Hibernate annotations and so I wonder what is the best practice -- method level ... |
2. private member variables vs. Map in POJO forum.hibernate.orgI'm new to Hibernate, and need some advice on two different POJO implementation approaches for each hbm definition. For every property that I define inside Hibernate hbm file, the first approach is to declare private member variables, and corresponding getters and setters functions. The second approach is to create a Map variable that will hold all values (using property name as ... |
3. POJOs instance variables and accessor methods forum.hibernate.orgHello everybody, In Hibernate's reference guide, it is stated that by default, Hibernate will use a POJO's accessor methods (getters/setters) and not the instance variables directly. Does this imply that if I were to have a POJO with only accessor methods and *no* instance variables defined, Hibernate can still persist that POJO (entity) correctly? For example, let's say I have the ... |