mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-03 08:24:23 +00:00
#1212 - ENH: Add query findSingleAttribute()
This commit is contained in:
1 parent
d5555ed9a9
commit
fcff571664
4 files changed
+132
-65
No files matched your search
@@ -1284,6 +1284,12 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
return (List<A>) server.findSingleAttributeList(this, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <A> A findSingleAttribute() {
|
||||
List<A> list = findSingleAttributeList();
|
||||
return !list.isEmpty() ? list.get(0) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T findOne() {
|
||||
return server.findOne(this, null);
|
||||
|
||||
Reference in new issue
Block a user