Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mapping 4 database tables using single CMP bean

 
Raj Prasad
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic