• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

EJB to RDB (bottom-up) Mapping does not generate a primary key

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
I found a beautiful pie. And a tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic