-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: persisting files in DB
PostPosted: Mon May 07, 2007 7:16 am 
Newbie

Joined: Mon Mar 26, 2007 7:50 am
Posts: 18
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>


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 07, 2007 8:38 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
http://www.hibernate.org/hib_docs/v3/re ... properties


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.