The Financial table only need CURRENCY_KEY, LOCATION_KEY, etc.. it doesn't need to have the DimCurrency, DimLocation, etc whole as an object to have my Financial object, so I donot need to write extra lazy="false" in my Pojo's XDoclet. It was my bad habit to copy=paste everything without comparing my needs, I copy the Xdoclet declaration from other source that turn not to be lazy one. Hibernate is automatically set to be lazy by default. here's taken from my DimCurrency:
/**
* @return Returns the financials.
*
* @hibernate.bag name="financials" lazy="true" cascade="all"
* @hibernate.collection-key column="CURRENCY_KEY"
* @hibernate.collection-one-to-many class="id.co.model.Financial"
*/
public List
return financials;
}
public void setFinancials(List
this.financials = financials;
}
It's still gimme error after I set lazy, the something named GGG error or something. I browse the net and it says that it needs an empty constructor for the pojos, wheter the Financial or the Dims, I forgot it, I just add it into all my pojos. sorry I missed the link, I write this post after repair my application, set it to lazy, and everything's go faster after the lazy things. just let's go to be l[cr]azy for a while!
No comments:
Post a Comment