ROO: how to create composit primary key in Entity

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-05-07T12:45:02Z Indexed on 2010/05/07 12:48 UTC
Read the original article Hit count: 498

Filed under:
|
|

Hi,

What can I do if I need to create entity for a table in production DB (Oracle 10g) with composite primary key.

For example: [CODE]

CREATE TABLE TACCOUNT
(
  BRANCHID     NUMBER(3)                        NOT NULL,
  ACC          VARCHAR2(18 BYTE)                NOT NULL,
  DATE_OPEN    DATE                             NOT NULL,
  DATE_CLOSE   DATE,
  NOTE         VARCHAR2(38 BYTE)
);
CREATE UNIQUE INDEX PK_TACCOUNT ON TACCOUNT
(BRANCHID, ACC);

I don't want to change the structure of this table.

Is it possible to create an "id" field using roo commands?

I use Spring Roo 1.0.2.RELEASE [rev 638]

Paul

© Stack Overflow or respective owner

Related posts about entity

Related posts about primary