• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB to DB table mapping

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
can anyone tell me how I can map my EJB to the database table ? Once I wrote an Entity Bean and I guess the name was equal to the database table and all worked with the standard defined mapping in AAT. But now I get some stange websphere intern exception that sounds like if he can't find the table (EJBName != tablename).
any hints ?
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ey Max,
You do the following to map en ejb to a rdb.
Bring up the context menu off the EJB Project (right mouse click) and select the Generate -> EJB To RDB MAPPING. If you've already got a database table and the entity bean you select meet in the middle. Fill in the db name and the correct username/password, click next, select the correct db/ tables, then click finish.
This will generate a map.mapxmi file I believe. Double clicking on this file will open the mapping view. You can check if you entities are correctly mapped to the tables there. If they're not, that's also the place to fix it, first select both the entity name and the table name, then bring up the context menu and select "create mapping", then do the same for the attributes.
Hope this helps kind regards
Michiel,
 
Maximilian Trenks
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are you talking off WSAD or AAT ?
i dont use WSAD ...
 
reply
    Bookmark Topic Watch Topic
  • New Topic