mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
Pr/id in as collection2 (#1034)
* ENH: Changed idIn(List) to idIn(Collection) * ADD: sanity checks in IdBinder & special case if ID-list is empty
This commit is contained in:
1 parent
c454e1f8a7
commit
a1f95bf25e
10 files changed
+55
-38
No files matched your search
@@ -172,6 +172,9 @@ public final class IdBinderEmbedded implements IdBinder {
|
||||
|
||||
@Override
|
||||
public String getIdInValueExprDelete(int size) {
|
||||
if (size <= 0) {
|
||||
throw new IndexOutOfBoundsException("The size must be at least 1");
|
||||
}
|
||||
if (!idInExpandedForm) {
|
||||
return getIdInValueExpr(size);
|
||||
}
|
||||
@@ -199,7 +202,9 @@ public final class IdBinderEmbedded implements IdBinder {
|
||||
|
||||
@Override
|
||||
public String getIdInValueExpr(int size) {
|
||||
|
||||
if (size <= 0) {
|
||||
throw new IndexOutOfBoundsException("The size must be at least 1");
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (!idInExpandedForm) {
|
||||
|
||||
Reference in new issue
Block a user