-->
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.  [ 1 post ] 
Author Message
 Post subject: Missing inserts statements
PostPosted: Fri Apr 25, 2014 6:57 am 
Newbie

Joined: Mon Feb 21, 2011 6:57 am
Posts: 8
Hi everybody,

yesterday we encountered a strange (and a bit worrying) behaiour on our web application, using Hibernate 3.6.7.Final and PostgreSQL 9.0.7.
We installed in production environment this new many-to-one mapping relation on the Java class "OperazioneDiCarico.java", here follows a part of Hibernate mapping:

Code:
    <class name="it.loginet.petrol.domain.carico.OperazioneDiCarico">
      <id name="id" access="field">
          <generator class="assigned"/>
      </id>
........
<many-to-one name="inizioCarico" class="it.loginet.petrol.domain.carico.RichiestaAutorizzazioneCarico" access="field" cascade="save-update" unique="true"/>
........


which relates to a new Java class mapped in this way, RichiestaAutorizzazioneCarico.java, mapping follows:

Code:
   <class name="it.loginet.petrol.domain.carico.RichiestaAutorizzazioneCarico" table="iniziocarico">
      <id name="id" access="field">
         <generator class="native" />
      </id>
      <property name="codiceCorsia" access="field" />
      <property name="mezzoBadgeCode" access="field" />

      <set name="autorizzazioneAlCaricoBraccio" lazy="false" cascade="all"
         access="field">
         <key column="richiestaAutorizzazioneCarico" not-null="true" />
         <one-to-many
            class="it.loginet.petrol.domain.carico.AutorizzazioneAlCaricoBraccio" />
      </set>

      <set name="autorizzazioneAlCaricoAdditivatore" lazy="false"
         cascade="all" access="field">
         <key column="richiestaAutorizzazioneCarico" not-null="true" />
         <one-to-many
            class="it.loginet.petrol.domain.carico.AutorizzazioneAlCaricoAdditivatore" />
      </set>
   </class>

   <class name="it.loginet.petrol.domain.carico.AutorizzazioneAlCaricoBraccio" table="iniziocaricoperbraccio">
      <id name="id" access="field">
         <generator class="native" />
      </id>
      <property name="numeroBraccio" access="field" />
      <property name="braccioFunzionante" access="field" />
      <property name="totaleNonAzzerabile" access="field" />
      <property name="totaleNonAzzerabile15" access="field" />
   </class>

   <class
      name="it.loginet.petrol.domain.carico.AutorizzazioneAlCaricoAdditivatore" table="iniziocaricoperadditivatore">
      <id name="id" access="field">
         <generator class="native" />
      </id>
      <property name="numeroBraccio" access="field" />
      <property name="codiceAdditivatore" access="field" />
      <property name="additivatoreFunzionante" access="field" />
      <property name="totaleNonAzzerabile" access="field" />
   </class>


The first day of production everything goes fine, the update statement on class OperazioneDiCarico.java and the insert statement for class RichiestaAutorizzazioneCarico (with the 2 other classes in cascade) worked perfectly, the persistence on database was ok.

Unfortunately the second day something went wrong, we can't really understand what.
Simply, the persistence of the class with many-to-one relation RichiestaAutorizzazioneCarico stopped working, no more inserts were done on the DB and we can't find the reason.
No exception was logged from our application, in the next days we will monitor Hibernate logging to see if something appears while the application should create and execute the inserts statements on DB.

Have you encountered something similar with your applications? We made other similar mappings in our applications and they continues to work fine without problems.

If I found notable data on the Hibernate log4j while monitoring the application, I'll append here as soon as possible. If I missed something important, just tell me and I'll update the post

Thanks for your help in advance.

Leonardo


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

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.