Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2.5
Mapping documents: Hibernate Annotations 3.3
Name and version of the database you are using: Oracle 10g
Dear All,
I am having a table named VENDORDETAILS which is having some fields like (ID, NAME, ADDRESS, CREATEDBY, CREATIONDATE, LASTUPDATEDBY, LASTUPDATIONDATE). Now I am having two classes like
Code:
@Entity(name="VENDORDETAILS")
Public class Vender{
@Id
@column(name=”ID”)
private long id;
@column(name=”NAME”)
private String name;
@column(name=”ADDRESSNAME”)
private String address;
//Getters and setters
}
The class for RecordLog
Code:
Import java.sql.Date;
Public class RecordLog{
private long createdByUserId;
private Date creationDate
private long lastUpdatedByUserId;
private Date lastUpdationDate;
//getters & setters.
}
Now my problem is that
how can I store the data of two classes in one table as I use the object of RecordLog when ever I need to store the log information in any table. I could not get that how can I use object of this class in the Vendor class. Because in my database I don’t have any separate tables for both this classes.
I just want to store the data of both these classes in only one table. So anybody please guide me that how can solve my problem.
Thank you in advance,