This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | PNFE : The class 'pioweb.PytanieController' does not have the property 'odpowiedziOfPytanie' | ||
---|---|---|---|
Product: | javaee | Reporter: | jlaskowski <jlaskowski> |
Component: | JSF | Assignee: | Matthew Bohm <mbohm> |
Status: | RESOLVED INVALID | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
jlaskowski
2008-03-23 16:07:39 UTC
Please specify more clear how you reproduce this problem by using the JSF Pages from Entity Class. 1/ Created a Java Class Library project with two entities in @OneToMany relationship - Pytanie and Odpowiedz. Pytanie had odpowiedzi persistent attribute of type java.util.List<Odpowiedz> 2/ Created a Web Application project of which the Java Class Library with the entities was a dependency (library) 3/ Upon executing the wizard the New.jsp page for Pytanie had not the persistent property and that's the exception all about. Yes, please attach to project. Thanks. The project with 2 entities in @OneToMany relationship and the other - web application project are at http://www.jaceklaskowski.pl/aplikacje/pio-netbeansprojects.zip. They worked fine as I'd manually added the missing property - odpowiedziOfPytanie - to the backing bean - pioweb.PytanieController. Remove the property and you'll see the issue. I notice this application was generated with out-of-date netbeans code. You may want to try generating the application from the entities again, using current netbeans code. I tried with current netbeans code; that was not the problem. But I do think I see the cause. Odpowiedz does not have a property of type Pytanie with an appropriate @ManyToOne annotation. Here is an example that appears in the JPA specification: Example 1: One-to-Many association using generics In Customer class: @OneToMany(cascade=ALL, mappedBy=”customer”) public Set<Order> getOrders() { return orders; } In Order class: @ManyToOne @JoinColumn(name="CUST_ID", nullable=false) public Customer getCustomer() { return customer; } |