field « POJO « JPA Q&A





1. Is there any way to declare final fields for Hibernate-managed objects?    stackoverflow.com

I'm just getting started with Hibernate, and all the examples I'm seeing so far look pretty much like the tutorial in the Hibernate documentation:

package org.hibernate.tutorial.domain;
import java.util.Date;

public class Event {

   ...

2. Retrive single field raher than whole pojo in hibernate    stackoverflow.com

I have some query regarding hibernate, Table : Employee_Master Id Number Name Varchar Salary long POJO: EmployeeMaster.java

public class EmployeeMaster {

private int id ;
private String name;
private long salary;

//... ...

4. Hibernate mapping pojo/fields to different tables.    coderanch.com

I need to map a POJO to different tables/columns. In my application I have a Search option where the search filters are fetched from different tables. For e.g there are drop downs on the search page with each containing primary keys of corresponding tables. The search option is performed on a different table with the selected values. Once a user selects ...

5. How to auto-map MultiSelect listbox values to a POJO field?    forum.hibernate.org

Newbie Joined: Tue Feb 16, 2010 6:57 pm Posts: 17 I checked a lot of sources but couldn't get the whole picture of how this is done. I created a MulitSelect Listbox on a View which I expect to correspond to its relevant POJO's field with data type 'List' e.g. List meds = new ArrayList(); In another words, I want it ...

6. Adding additional fields to the POJO    forum.hibernate.org

7. Exclude Field From POJO    forum.hibernate.org

Hi, I have a POJO class which is mapped to a table. I would also like to have a field in the pojo which is not mapped to any tables. My POJO class Code: @Entity(name = "test") @Table(appliesTo = "test") class Test { @Id @GeneratedValue ...

8. how to persist pojo along with sysdate for a date field    forum.hibernate.org

Hi I have a requirement where in i have to insert a record into db with sysdate as date column value. I have written POJO class for the table. now i want to store the pojo class instance along with sysdate in one of the fields of pojo. please let me know whether it is possible in this way if not ...

9. can we define a pojo without a identity field    forum.hibernate.org

I am fairly new to hibernate. Here I have a database table which includes zip code info and does not have an id column. (This is a third party database table which we used in our application). I am using xdoclet to generate mapping files. So I created POJO class which represents this table structure. Then I tried to compile this ...