Here
is a simple example that will generate a primary key composed of two
Strings .
/**
* @ejb.bean
* name="Foo"
* type="CMP"
*
local-jndi-name="local/Foo"
* view-type="local"
* schema="Foo"
* cmp-version="2.x"
* @ejb.pk
*
* [ put other class tags as needed ]
*
**/
public abstract class Foo implements EntityBean
{
/**
* @ejb.pk
*
* [ put other method tags as needed
]
*
**/
public abstract String getKeyValueA
();
public void setKeyValueA (String
value);
/**
* @ejb.pk
*
* [ put other method tags as needed
]
*
**/
public abstract String getKeyValueB
();
public void setKeyValueB (String
value);
[ The rest of your class definition
]
}
I hope
that helps,
Joel
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of ravishankar dwivedi
Sent: Thursday, April 03, 2003 11:29 AM
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] Composite Primary Key
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of ravishankar dwivedi
Sent: Thursday, April 03, 2003 11:29 AM
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] Composite Primary Key
Hi All,
Please suggest how to define composite keys in with the help of XDoclet tags
regards
ravi
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
