for example:
@Entity public class Order[ @OneToMany(fetch=FetchType.LAZY,mappedBy = "order") SetI encounter the issue with Spring IDE (STS 2.9), Spring 3.1 and JUnit 4.- items; //... }
When running a JUnit test against the Service layer which needed to read lazy properties - same line of code (the invocation of a Lazy property) failed on Debug (exception) however succeeded on Run mode.
The problematic line is something like that:
Order order = getOrderById(orderId); order.getItems(); // Exception on debug
Black magic indeed.
Hope this save time to someone..
No comments :
Post a Comment