Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Proper Syntax for a Named Query

 
Mirrell Knabe
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi....What is the proper Syntax for creating a NamedQuery to select all rows from a table and then subsequently store them in an ArrayList (for Display in an IceFaces Picklist)?

These two are not to working (below), both erroring on the Query statement (BOLD):

DEFINITIONS:







USE:







 
Mirrell Knabe
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, I could really use some help on this one...Let me know if I need to provide more info...I can successfully execute
a delete statement....

I am using this NamedQuery:



I am getting a NullPointerException on this statement (in Bold):



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two relevant FAQ entries: please read this and read this.

NamedQuery? Using Hibernate?
 
Mirrell Knabe
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear....My apologies.....to answer your question....Yes, it is NamedQuery and Yes, I am using Hibernate....I really do appreciate your time (and everyone's).....
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I've moved this to the ORM forum where people familiar with Hibernate hang out. Posting in the right forum is the best way to make sure that your post gets the attention of the right people.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic