Hello,
the proben can be reproduced using the attached project.
I have two entites: Customer ans Order. One Customer has many orders.
Customer.java
@Table(name = "SORTDEMO_CUSTOMER")
@Entity(name = "sortdemo$Customer")
public class Customer extends StandardEntity {
private static final long serialVersionUID = 5651503276941310295L;
@Column(name = "NAME")
protected String name;
@Composition
@OnDelete(DeletePolicy.CASCADE)
@OneToMany(mappedBy = "customer")
protected Set<Order> orders;
...
@Transient
@MetaProperty(related = "orders")
public String getOrderList() {
return orders.toString(); // simplified to String implementation
}
}
In customer-browse.xml two columns ‘name’ and ‘orderList’ are displayed.
The problem can be produced with this workflow:
- Login to applicaton
- Open Applicaton/Customers
-> the list of customers with one entry is displayed - Click on orderList column to sort it
- Click search to reload the data
-> A NullPointerException occures - Logout & Login again
- Open Applicaton/Customers
-> Internal error happens (also NullPointerException)
You have to delete the UserSetting for ‘sortdemo$Customer.browse’ to open the Customers list again.
I have to admit that sorting a one to many relation will not create a meaningful result. But this bug creates a situation where the user cannot user a certain grid anymore.
Thanks in advance.
Yours,
Joerg
sort-demo.zip (129.5K)