Skip to content
This repository was archived by the owner on Oct 13, 2020. It is now read-only.

Commit d657b2f

Browse files
committed
#58 - ENH: Add setLabel() ... to set the label on a query
1 parent bb74676 commit d657b2f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/main/java/io/ebean/typequery/TQRootBean.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,18 @@ public R setIdIn(Object... ids) {
719719
return root;
720720
}
721721

722+
/**
723+
* Set a label on the query.
724+
* <p>
725+
* This label can be used to help identify query performance metrics but we can also use
726+
* profile location enhancement on Finders so for some that would be a better option.
727+
* </p>
728+
*/
729+
public R setLabel(String label) {
730+
query.setLabel(label);
731+
return root;
732+
}
733+
722734
/**
723735
* Set the default lazy loading batch size to use.
724736
* <p>

0 commit comments

Comments
 (0)