Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.2
Hi all, I'd like to save some files into the db, these works fine...
but it's not a good idea to load the value_file attribute of the EntryValues Class everytime an object of the class is loaded...
my question is how to prevent these?
thanks in advance,
Omid
Mapping documents:
Code:
<class name="main.org.jboss.portlet.milestone.spring.dto.EntryValues"
table="entryValues">
<id column="id" name="id">
<generator class="increment" />
</id>
<property name="value" column="value" type="string" not-null="false" />
<property name="value_bool" column="value_bool" type="boolean" not-null="false" />
<property name="value_date" column="value_date" type="date" not-null="false" />
<property name="value_file" column="value_file" type="java.io.File" not-null="false"/>
<property name="selected" column="selected" type="main.org.jboss.portlet.milestone.spring.dto.Pair" not-null="false" />
<property name="dataType" column="dataType" not-null="false"
type="main.org.jboss.portlet.milestone.spring.dto.DataType" />
<list name="values">
<key column="pair_id" />
<list-index column="pair_idx" />
<one-to-many class="main.org.jboss.portlet.milestone.spring.dto.Pair"/>
</list>
</class>