I should point out that in the above, the named query getID is a nativeNamedQuery but has the resultClass set to Task like so. I thought that this would result in the returned object being managed by the entitymanager?
@NamedNativeQuery(name = "getID", query = "SELECT xxx FROM task WHERE xxx FOR UPDATE LIMIT 1", resultClass=Task.class)
[Message sent by forum member 'jsl123' (jsl123)]
http://forums.java.net/jive/thread.jspa?messageID=217969