Hi Daryl, All that I can say is that the posting you referenced is almost two years old and it may have been resolved in the release that you ran against. What version of OpenJPA did you try to reproduce the problem with? I did a quick search of our JIRA's to see if this has been resolved, but I couldn't find an exact match.
Kevin On Tue, Sep 8, 2009 at 7:28 AM, Daryl Stultz <[email protected]> wrote: > Hey, > Through some wacky querying I came across this: > > > http://n2.nabble.com/Persistent-entities-pass-as-params-to-JPQL-queries-MUST-be-attached-Query-getSingleResult-bug-or-exp-td209033.html > > I tried to verify this but could not. Here's a simple attempt: > > User user = new User(); > user.setId(userId); > Query query = em.createQuery("select o from ScheduledAssignment as o where > o.user = :user"); > query.setParameter("user", user); > System.out.println(query.getSingleResult()); // also works with > getResultList (there's only one) > > This works just fine. Can anyone set the issue straight? Thanks. > > -- > Daryl Stultz > _____________________________________ > 6 Degrees Software and Consulting, Inc. > http://www.6degrees.com > mailto:[email protected] >
