I'm trying to create a new entity bean for an existing application. When I deploy I get the following error:
org.jboss.deployment.DeploymentException: Field changeDate in prim-key-class must be of the same type.
CREATE TABLE `projecthistory` ( `ProjectId` int(11) NOT NULL default '0', `ChangeDate` datetime NOT NULL, `UserID` varchar(50) NOT NULL, `Status` int(11) NOT NULL default '0', PRIMARY KEY (`ProjectId`, `ChangeDate`), KEY `projecthistory_ProjectID_FK` (`ProjectId`), CONSTRAINT `projecthistory_ProjectID_FK` FOREIGN KEY (`ProjectId`) REFERENCES `projects` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE );
<prim-key-class>lingonet.projecthistory.ProjectHistoryKey</prim-key-class>
public class ProjectHistoryKey { public Integer projectID; public Date changeDate; public ProjectHistoryKey (Integer projectID, Date changeDate) { this.projectID = projectID; this.changeDate = changeDate; } }