Hi all,
i have this manytomany database relation with product_has_category table:
product ----|< product_has_category |>— category
Java Entities seems to be ok as i tested them. But when i try this:
...
JPAContainer<Product> products = JPAContainerFactory.make(Product.class,"myorm.orm");
Category c = new Category();
c.setCategoryId(1);
Equal eq = new Equal("productHasCategories.category",c);
products.addContainerFilter(eq);
products.addNestedContainerProperty("produtHasCategories.category.title");
layout.addComponent(new Table("productTableTest",products));
....
addContainerFilter runs ok, but i tried to access to category properties and i obtain that :
java.lang.IllegalArgumentException: Invalid property name
com.vaadin.addon.jpacontainer.PropertyList.getNestedProperty(PropertyList.java:421)
com.vaadin.addon.jpacontainer.PropertyList.getNestedProperty(PropertyList.java:391)
com.vaadin.addon.jpacontainer.PropertyList.addNestedProperty(PropertyList.java:248)
com.vaadin.addon.jpacontainer.JPAContainer.addNestedContainerProperty(JPAContainer.java:291)
com.mycatalogbox.vaadin.MyCatalogBoxVaadinUI.init(MyCatalogBoxVaadinUI.java:90)
com.vaadin.ui.UI.doInit(UI.java:529)
com.vaadin.server.AbstractCommunicationManager.getBrowserDetailsUI(AbstractCommunicationManager.java:2468)
com.vaadin.server.AbstractCommunicationManager.handleBrowserDetailsRequest(AbstractCommunicationManager.java:2362)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:325)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
i tried in different ways without success. It’s possible to access in a Vaadin Table with JPAContainer to oneToMany attributes ??
Thank you in advance,
JuanMa