• Post Reply Bookmark Topic Watch Topic
  • New Topic

retrieving a list from a many to many

Chris Merani
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok guys, I am struggling with another many to many problem. I have two tables, MATERIAL_RECORD and KEYWORDS tied by a lookup table KEYWORDS_LOOKUP. Netbeans created the JPA entity classes as well as the JPA Controller classes. I am trying to get the application to output the keywords associated with a specific material_record. I have figured out how to get it to tell me how many keywords are associated. I have also figured out how to get it to output the actual list of elements but it outputs them with the keyid instead of the actual "name" (string). Please see my test class below. If you need to see anything else just let me know as I didnt want to clog up the post with too much code.

{[JPA.Keywords[ keyId=9 ], JPA.Keywords[ keyId=10 ]]}
JPA.Keywords[ keyId=9 ]
JPA.Keywords[ keyId=10 ]
BUILD SUCCESSFUL (total time: 3 seconds)

my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!