v8.3d_2012-10-22/Pro Deployment (built 2012-10-22)
I'll try to describe as simple as i can.
I have:
1. Hibernate bean describing the following LAZY field:
2. Datasource XML-definition with ignore flag
3. Standard list grid
Everything is working fine, except the thing that LAZY field "roles" is initialized during ListGrid fetch operation: i can see multiple sql queries in the log.
I've tried ignore=true, as shown in example, but without any success.
Is there a way to make SmartGwt respect Lazy attribute and not initialize the fields not shown in ListGrid?
I'll try to describe as simple as i can.
I have:
1. Hibernate bean describing the following LAZY field:
Code:
@ManyToMany(targetEntity = Role.class, fetch = FetchType.LAZY) @JoinTable(name = "userrole", joinColumns = @JoinColumn(name = "UserID"), inverseJoinColumns = @JoinColumn(name = "URID")) public List<Role> getRoles() { return roles; } public void setRoles(List<Role> roles) { this.roles = roles; }
Code:
<DataSource ID="users" serverType="hibernate" beanClassName="com.myPackage.etgcrm.server.model.User" schemaBean="com.myPackage.etgcrm.server.model.User"> <fields> ... <field name="roles" ignore="true"/> ... </fields> </DataSource>
Code:
DataSource ds = DataSource.get("users"); ListGrid listGrid = new ListGrid(); listGrid.setDataSource(ds); listGrid.setAutoFetchData(true);
I've tried ignore=true, as shown in example, but without any success.
Is there a way to make SmartGwt respect Lazy attribute and not initialize the fields not shown in ListGrid?
Comment