• 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

EJB QL w/ ManyToMany

 
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My SQL is a little weak. You toss in the mutant alien cross with EJB and it confuses me even more. If anyone could give me some insight into this ManyToMany relationship and how to query across it, I would appreciate it.

Some code snippits included. All insert into and retrieve from the DB fine.

 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ferreted out a result. Or two actually, but I think they're equivalent. If you know of a better or more common solution, please let me know!




either of these requires a slightly different setting of the parameters of the Query before it is invoked:



And, of course, flatting it out into one annotation makes it much harder to understand:


[ March 05, 2008: Message edited by: Bill Shirley ]
[ March 05, 2008: Message edited by: Bill Shirley ]
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic