• 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
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Mapping 4 database tables using single CMP bean

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to map 4 database tables using single CMP bean?

I want to insert, update and delete operations using the bean.

Thanks,
Raj
 
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most likely, you need a good book on EJB 3.0!

If you are using the Container Manager Persistence implemented in Enterprise Java Beans 3.0, you should check the documentation of the @SecondaryTable annotation.

You will also be interested in @SecondaryTables, @Table, and @Column.

Each secondary table will need to be able to be joined to the main table.
 
Raj Prasad
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible with EJB 2.0?

I want to map 2 to 3 tables using CMP EJB? How do i do that?
 
author & internet detective
Posts: 42165
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raj Prasad:
Is it possible with EJB 2.0?


It is possible in EJB 2.1. EJB changed quite a bit between 2.0 and 2.1. I don't remember if it was possible in 2.0.

It tends to be app server specific though. For example, here's how to do it in WebLogic.
reply
    Bookmark Topic Watch Topic
  • New Topic