mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-02 08:21:46 +00:00
35 lines
686 B
Java
35 lines
686 B
Java
package com.avaje.tests.autofetch;
|
|
|
|
import com.avaje.ebean.Ebean;
|
|
import com.avaje.tests.model.basic.EBasicClob;
|
|
|
|
import java.util.List;
|
|
|
|
public class MainAutoFetchExcludeLazyLobs {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
EBasicClob a = new EBasicClob();
|
|
a.setName("name 1");
|
|
a.setTitle("a title");
|
|
a.setDescription("not that meaningful");
|
|
|
|
Ebean.save(a);
|
|
|
|
List<EBasicClob> list = Ebean.find(EBasicClob.class)
|
|
.setAutoTune(true)
|
|
.findList();
|
|
|
|
for (EBasicClob bean : list) {
|
|
bean.getName();
|
|
// although we read the description
|
|
// autofetch will not include it later
|
|
bean.getDescription();
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|