I have a Stock and StockRecords classes with one to many relationship.
In Stock.hbm.xml , i have a collection defined like this
<bag name="stockRecords" table="stockRecords" inverse="true" lazy="true"
fetch="select">
<key>
<column name="stock_Records" not-null="true" />
</key>
<one-to-many class="com.my.model.objects.StockRecords" />
</bag>
I am accesing one stock at a time. here is the problem
Stockrecords has one filed (String type) which will contain 500000 characters in it on an average
In StockRecords.hbm.xml
<property name="summary" type="string" lazy="true" >
<column name="summary" />
</property>
While i am accesing one of the stock entity based on id, i am trying to build a string of all the summary fields from all the stock records of that stock. I am getting java heap space error her i have my jvm setting set to 512m. is this hibernate or java thing?
hibernate 4.xx java 1.7