Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Mapping 4 database tables using single CMP bean

 
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
 
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?
 
author & internet detective
Posts: 40169
812
Eclipse IDE VI Editor Java
  • 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.
 
The harder I work, the luckier I get. -Sam Goldwyn So tiny. - this ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic