NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
SecurePAX
Joined: 22 Sep 2011 Posts: 4
|
Posted: Fri Jun 15, 2012 8:11 pm Post subject: Order By in @Named Query not working |
|
|
New to Jave, new to netbeans. I'm following the e-Commerce tut to get
up to speed.
ControllerServlet includes:
@EJB
private CrewFacade crewFacade;
...
@Override
public void init() throws ServletException {
// store employee list in servlet context
getServletContext().setAttribute("crewList",
crewFacade.findAll());
Crew.java includes:
@NamedQueries({
@NamedQuery(name = "Crew.findAll", query = "SELECT c FROM Crew c
ORDER BY c.lastName"),
Results looks like:
BROOKS
TRAVOLTA
TAYLOR
ADAMS
GAINS
Obviously not sorted. Cleaned and rebuilt before this note. Output is
complete, but not sorted. What's up? I need to get these simple
@Named Query mods understood, as I have 'multiple joins' and WHERE
clauses to add.
Any help? links to investigate? thanks in advance. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|