I am new user of hibernate 4.3.6. Got some basic relationship code working, but struggling with multiple relationship with same table.
Consider usual Person and Address example. A person can have multiple addresses, onle one if them is current. I want to declare relationships on between these two tables. First one is for current address which states iscurrent field of address table is true. Other is for all addresses including current one. Based on what I have read/searched so far, it looks like this is possible using filters, but not sure how to get it working.
Ideally all relations will be lazily loaded
So far, I have managed to save data and get current address from person, but my all address relation is failing. No matter what I do, all addresses field is not being read.
|