I use the bottom-up mapping approach to generate enterprise beans and
map from an existing database. However, after generating the beans, I
got one warning message and one error.
Warning message - A primary key does not exist for table: CUSTOMER
Error message - Key class CustomerKey does not map to any fields in
enterprise bean Customer. (
EJB 2.0:10.8, 22.5).
In other words, it does create a CUSTOMER table in the Database module.
However, there is no primary key in this table. Consequently, although
it created a key class CustomerKey.java, it does not map to any fields
in the bean/table, because there is no primary key generated.
When I looked at the associated existing table that I used to generate
the bean, there is a primary key defined. Does anybody know why I got
the errors?
I am using IBM WebSphere Studio Application Developer v 5.1.1 and
DB2 Universal Database for iSeries, V5R2.
I am new to this area and this issue really bothers me for a few days.
Please let me know if you have any ideas.
Thanks in advance,
Jerry