i have two classes associated with OneToMany - ManyToOne mapping.
When i select parent Entity it selects Child entity also but, all child instances assigned to it's every parent instances instead of assign related instances. 

PurchaseEntry.java

```
@Entity
@Table(name="PURCHASE_ENTRY")
public class PurchaseEntry {

    public PurchaseEntry() {
    }
    @Id @Column(name="PURCHASE_ID") @GeneratedValue(strategy=GenerationType.AUTO)
    private long purchaseId;
    @Column(name="INVOICE_NO")
    private String invoiceNo;
    @Column(name="INVOICE_DATE")
    @Type(type="date")
    private Date invoiceDate;          

    @OneToMany(targetEntity=PurchaseDetails.class, cascade=CascadeType.ALL, fetch=FetchType.EAGER)
    @JoinColumn(name="PURCHASE_ID")
    private Collection<PurchaseDetails> purchaseDetailsList = new ArrayList<PurchaseDetails>(); 
}

```

PurchaseDetails.java

```
@Entity
@Table(name = "PURCHASE_DETAILS")
public class PurchaseDetails {

    public PurchaseDetails() {
    }

    @Id
    @Column(name = "PURCHASE_DETAIL_ID")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long purchaseDetailId;
    @Column(name = "AMOUNT")
    private float amount;    

    @ManyToOne
    @JoinColumn(name = "PURCHASE_ID")
    private PurchaseEntry purchaseEntry;

}

```

when saving PurchaseEntry.java object with PurchaseDetails.java instance Collection it works fine but while selecting parent table it selects related child table rows but this related all rows are assigned for every parent class object

select query 

```
Criteria criteria = session.createCriteria(PurchaseEntry.class)
                    .add(Restrictions.between("invoiceDate", fromFilterDate, toFilterDate)).addOrder(Order.asc("invoiceDate"));

            purchaseEntryList = criteria.list();

```

for example Purchase\_Entry table has row with 

purchase\_id - 1,
invoice\_date - 18-07-2014

and Purchase\_details table has 

PURCHASE\_DETAIL\_ID - 1,
purchase\_id - 1,
...

PURCHASE\_DETAIL\_ID - 2,
purchase\_id - 1,
...

PURCHASE\_DETAIL\_ID - 3,
purchase\_id - 1,
...

when i **select PurchaseEntry** using criteria where **invoice\_date** '18-07-2014' it returns 3 PurchaseEntry objects, in every PurchaseEntry objects purchaseDetailsList has 3 PurchaseDetails objects related with **purchase\_id = 1**

what's wrong with my configuration or any other???

**expected** : every PurchaseEntry objects has only one related PurchaseDetails instance in purchaseDetailsList