-->
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: My property of type Blob isn't updated !
PostPosted: Wed Aug 04, 2004 11:09 am 
Newbie

Joined: Thu Jun 03, 2004 5:47 am
Posts: 13
Hibernate version = 2.0.3
mapping document =
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
   "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
   "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
   
<hibernate-mapping>
  <class name="org.jboss.nukes.core.themes.themeAlter.Couleur" table="alter_theme_couleur">
    <id name="idCouleur" type="string" unsaved-value="null" >
      <column name="idCouleur" sql-type="varchar(45)" not-null="true"/>
      <generator class="uuid.hex"/>
    </id>
    <property name="labelCouleur" column="labelCouleur" type="string" length="255" not-null="false"/>
    <property name="valCouleur" column="valCouleur" type="string" length="45" not-null="false"/>
    <property name="valImage" column="valImage" type="blob" not-null="false"/>
    </class>
</hibernate-mapping>

My database = MySQL 4.0

There is my problem :
I change the property named valImage in my object named Couleur, and I want to update my database with this object.
My blob valImage in my object is ok, but the database isn't updated.

It is updated if I changed the value of the property named valCouleur !!

In my HibernateProperties file the hibernate.jdbc.use_streams_for_binary property is true.

Someone can tell me why? and help me to debug this problem !
Thanks a lot in advanced.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 11:28 am 
Newbie

Joined: Thu Jun 03, 2004 5:47 am
Posts: 13
I put the property hibernate.show_sql to true and I can see that, indeed,
when I modify my blob in my objet and I do
Code:
ThemeAlter.couleur[i].setValImage(b);    //update in my object
AccesBD.session.update(ThemeAlter.couleur[i]);    //update in database
tx.commit();

I haven't this line :
Hibernate: update alter_theme_couleur set labelCouleur=?, valCouleur=?, valImage=? where idCouleur=?

And I don't understand why !!??


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.