History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-22616
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Gregory Shrago
Reporter: Davide Baroncelli
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

JPA - Empty Idclass generated by reverse engineering from the DB

Created: 09 Oct 07 17:51   Updated: 06 Dec 07 18:52
Component/s: J2EE.EJB3
Fix Version/s: Selena 7.0.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,330
Fixed in build: 7,524


 Description  « Hide
I just generated an entity by reverse engineering the following table:

CREATE TABLE FIDPUBLIC.CODES
(
DOMINIO VARCHAR2(30 BYTE) NOT NULL,
CODICE VARCHAR2(30 BYTE) NOT NULL,
VALORE VARCHAR2(50 BYTE) NOT NULL,
DESCRIZIONE VARCHAR2(50 BYTE),
DATE_FROM DATE NOT NULL,
DATE_TO DATE
)

ALTER TABLE FIDPUBLIC.CODES ADD (
CONSTRAINT PK_CODES
PRIMARY KEY
(DOMINIO, CODICE, DATE_FROM)

Idea correctly generated an entity with an Idclass:

@Entity
@Table( schema = "FIDPUBLIC", name = "CODES" )
@IdClass( CodePK.class )
public class Code {
private String dominio;

@Id
@Column( name = "DOMINIO", nullable = false, length = 30 )
public String getDominio() { return dominio; }
...

but the idclass is empty:

public class CodePK implements Serializable {
}

(it should at least include the definitions for the same columns marked as @Id in the entity class, and hashcode and equals methods.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.