2 Replies Latest reply on Jul 2, 2008 9:37 AM by Leonidas79

    hanging request for an update using Hibernate and Mysql

      hi everyone.
      i'm using Hibernate,mysql and DS for so many tables and it works fine for CRUD , i have a problem with just one table when i try to update records , the request is hanging so long before it works , i don't know what's wrong , here some code that can help.

      <class name="com.sample.Marking" table="marking">
      <id name="markingId" type="java.lang.Integer">
      <column name="markingId" />
      <generator class="increment" />
      <many-to-one name="users" class="com.sample.Users" fetch="select">
      <column name="userId" not-null="true" />
      <many-to-one name="offre" class="com.sample.Offre" fetch="select">
      <column name="offreId" not-null="true" />
      <property name="marked" type="java.lang.String">
      <column name="marked" length="1" not-null="true" />
      <property name="reserved" type="java.lang.String">
      <column name="reserved" length="1" not-null="true" />

      public function reserv():void{
      var param:Array = new Array;
      token = markingHibernateService.fill(reserveMarking,"flex:hql","from Marking m where m.offre = ? and m.users = ?",param);
      token.action = "reserv";
      public function refreshReserv(event:CollectionEvent):void{
      if(reserveMarking.length == 1){
      mark = reserveMarking.getItemAt(0) as Marking;

      private function resultHandler(event:ResultEvent):void{
      if(event.token.action == "reserv"){
      mark.reserved = "y";
      Alert.show("offer reserved with succes","info");

      <mx:DataService id="markingHibernateService" autoCommit="true" destination="markingHibernate" result="resultHandler(event)"/>

      i hope it can help. thx