Get max id entity ?

313 views
Skip to first unread message

antoine philippe chaker

unread,
Feb 14, 2013, 11:25:50 AM2/14/13
to quer...@googlegroups.com
Hi All,

What's the query to get the element with the max id ?
( select max(entity.id) from entity)

Thx

Timo Westkämper

unread,
Feb 14, 2013, 11:32:54 AM2/14/13
to Querydsl on behalf of antoine philippe chaker
Hi.

from(entity).singleResult(entity.id.max())

Timo

--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com


antoine philippe chaker

unread,
Feb 14, 2013, 11:57:35 AM2/14/13
to quer...@googlegroups.com
Thanks !!!!!
Reply all
Reply to author
Forward
0 new messages