Okay, I'm totally lost here:
Whenever the following code is executed I get this error:
org.hibernate.hql.ast.tree.FromClause.findIntendedAliasedFromElementBasedOnCrazyJPARequirements(FromClause.java:120)
What the heck does this mean? My HQL is perfectly valid!
public void endSession()
| {
| /*
| * first get all writing sessions with a null end date.
| */
| String userid = context.getCallerPrincipal().getName();
|
| List result = em.createQuery( "select w from WritingSession w where
w.whatProject.projectOwner=:whatName and w.whatProject.defaultProject=true and
w.sessionEnd=null order by id desc")
| .setParameter("whatName", userid).getResultList();
|
| if(result!=null || result.size()!=0)
| {
| WritingSession theOpenSession =
(WritingSession)result.get(result.size()-1);
| theOpenSession.setSessionEnd(new Date());
| em.merge(theOpenSession);
| }
|
| //otherwise there are no sessions to close.
| }
|
JLS
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976696#3976696
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976696
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user