JPAContainer and @ElementCollection

Hello,

I try to view datas from an entity which have a @ElementCollection, a list of enum type, List roles.

Here is my code, the entity :

[code]
@Entity
@Table(name = “users”)
public class User implements Serializable {

@Id
private String login;

private String name = “anonymous”;

private String email = null;

@Enumerated(EnumType.STRING)
@ElementCollection
private List roles = new ArrayList();

public enum Role {
/** user roles */
OPERATOR, MANAGER, ADMIN;
}
}
[/code]The view :

[code]
public class UsersView extends AbstractView { //AbstractView is a view with vertical layout

private JPAContainer mUserContainer = JPAContainerFactory.makeJndi(User.class);

@PostConstruct
private void initView() {
Table lPersonTable = new Table(“Liste des utilisateurs”, mUserContainer);
lPersonTable.setVisibleColumns((Object) new String
{“login”, “name”, “email”, “roles”});
addComponent(lPersonTable);
}
[/code]No error at runtime but my table is filled with “{IndirectList: not instantiated}” in the roles column. How can I get the user roles without setting the list eager ? Is it possible ?

Thanks for your help.