• 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
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

CMR in entity bean

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lets say I have EMPLOYEE table and a DEPT table. EMPLOYEE table has the deptid which is the foreign key. And I can establish CMR between the two entity beans.
If EMPLOYEE table does not have deptid column (ie there is no common columns between tables) can I still establish a CMR between the two entity beans?
 
Ranch Hand
Posts: 8946
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If EMPLOYEE table does not have deptid column (ie there is no common columns between tables) can I still establish a CMR between the two entity beans?


It is not possible to establish the relation since employee does not know the department and the departement is not even null , it does not just exist.
 
Deepa Malhotra
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Preadeep.
But if you look at the CMP example in Sun's tutorial, we have a Teams entity bean and a League entity bean. The underlying tables do not have any common columns, but the beans have a 1:* relationship established thro CMR.
Am I making sense?
 
Pradeep bhatt
Ranch Hand
Posts: 8946
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please pass the link to the tutorial. I checked the j2ee 1.3 tutorial but did not mention of Leage entity. It was just Team and Player entities.
 
Author
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Is it possible that this is a *:* relationship and there is an association table between them? That seems to make sense (a team could be in more than one league).
Hope this helps.
 
Deepa Malhotra
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the link for that tutorial:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/CMP.html
League and Teams have 1:* relationship. One League can have many teams and every team just belongs to League.
 
What's wrong? Where are you going? Stop! Read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic