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

Beginner needs help with EJB-QL and EJB relations.

 
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Further to an earlier post, I have more questions relating to ejbs and ejb-ql.
I have three tables in a relational database:
*First table, called "establishments", contains two fiels "db_establishment_id" and "db_establishment_name".
Here is a sample:

*Second table, called "categories", contains two fields "db_category_id" and "db_category_name"
Here is a sample:


*Third table, called "establishments_qualifiers", contains two fields "db_establishment_id" and "db_id_category"
Here is a sample:

These THREE tables map to TWO ejbs in a many-to-many bi-di relation (Is this the way it should be?) as follows:

Ideally I would like an EstablishmentEJB instance that contains a list of categories. How do I do that? Do I need to modify the design of my application? What is the ejb-ql I need?
Thanks in advance,
Julien Martin.
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic