This content has been marked as final.
Show 5 replies
-
1. Re: query revision type
adamw Jun 1, 2009 12:18 PM (in response to ax123man)Hello,
you can get this information using an entity-at-revision query. Using it you can get the entity, revision type and revision info at the same time.
Adam -
-
3. Re: query revision type
ax123man Jun 1, 2009 4:08 PM (in response to ax123man)ok, spoke too soon. How do I do that? I tried something like:
Object obj = reader.createQuery().forEntitiesAtRevision(clazz, new Integer(3)).getSingleResult();
but still get just the original entity. I see that AuditEntity has what I want but I'm not sure how to get one. -
4. Re: query revision type
ax123man Jun 2, 2009 3:20 PM (in response to ax123man)I see it now. forRevisionsOfEntity()
-
5. Re: query revision type
adamw Jun 3, 2009 2:10 AM (in response to ax123man)Ah yes, entities-for-revision doesn't give you this information, I forgot.
Maybe you can create a projection on the entity and the revision type? I don't quite remember what are the possibilities there.
Adam