[forge-users] Forge JPA entity with custom Id type

forge-users at lists.jboss.org forge-users at lists.jboss.org
Wed Jan 29 08:37:33 EST 2014


Hi,
Is there a way to generate an entity with a custom class as id?

Like:
/**
 * Class that define the Id
 */
@Embeddable
public class Code implements Serializable{
    private Integer number;
    private Integer year;
}

/**
 * My entity class
 */
@Entity
public class Document{

    @EmbeddedId
    private Code code;
}


Posted by forums
Original post: https://community.jboss.org/message/855351#855351



More information about the forge-users mailing list