• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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.
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic