Hello everyone,
I’m currently working on a vaadin project and stuck with the following problem---------------->
Here’s my RCIEntity class’s one-to-many relationship—
{
… @OneToMany (mappedBy = “rciEntity”)
private Set projectUserRoles;
}
now I take a jpa container JPAContainerrciEntityContainer = JPAContainerFactory.make(RCIEntity.class, GroupBuilderApp.PERSISTENCE_UNIT);
How can I filter the rciEntityContainer with RCIUserRole’s userAccount field?
Please help me, this filterring is giving me so much pain, last few days…
I’m using hibernate + jpacontainer on a sqlserver. When I use it normalyy everything is fine, but as soon as I use JoinFilter on a one to many relation I got duplicates. i’m not surprised (even if eclipseLink takes care of the join and the duplicates alnoe, a join normally produces duplicates) but I cannot find a clean way to get rid of them. At the moment I’m looking into the QueyModifierDelegate and I also thought about an “value IN ()” filter but vaadin container apparently hasn’t it?
Any input would be greately appreciated!
Actually there was a bug in Jpacontainer addon with that duplicate issue which I found marked solved in the bug ticket but dont get it work though :(.
Btw now a days vaadin dont encouraged to use jpacontainer for complex thing like we’re talking about that join filter issue. So its better to use JpaContainer for simple cases (e.g showing a simple table).
Well my grid so not that complex, is really just a list of entities from a table where I just want to apply Filter(s).
Nothing fancy, it all works good except when filtering on one to many relationships
Ok if your grid shows just the list of entities nothing else (e.g. any other process with those entities while clicking it or something else) then you can use the following code snippet which will show data without any duplicaiton: