-->
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: Problems using hibernate + swt application + various clients
PostPosted: Sat Jan 28, 2006 5:34 pm 
Newbie

Joined: Sat Jan 28, 2006 5:27 pm
Posts: 1
Hibernate version:
3.0.5
Mapping documents:

<hibernate-mapping>

<class name="pilates.Cliente" table="cliente">
<id name="idCliente" type="integer">
<generator class="native"/>
</id>
<property name="apellido" type="string"/>
<property name="cedula" type="string"/>
<property name="direccion" type="string"/>
<property name="edad" type="string"/>
<property name="estadoCivil" type="string"/>
<property name="huella" type="string"/>
<property name="mail" type="string"/>
<property name="nombre" type="string"/>
<property name="sexo" type="string"/>
<property name="telefono" type="string"/>
<property name="celular" type="string"/>
<property name="observaciones" type="string"/>
<property name="activo" type="string"/>
</class>

</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

Session session = Hibernate.currentSession(); // Transaction tx =
//session.beginTransaction();

// session.saveOrUpdate(u);
Query q = session
.createQuery("FROM Cliente WHERE nombre like :nombre AND apellido like :apellido AND cedula like :cedula and activo = :activo");

q.setString("activo", "T");

if (c.getNombre() != null)
q.setString("nombre", "%" + c.getNombre() + "%");
else
q.setString("nombre", "%");
if (c.getApellido() != null)
q.setString("apellido", "%" + c.getApellido() + "%");
else
q.setString("apellido", "%");
if (c.getCedula() != null)
q.setString("cedula", "%" + c.getCedula() + "%");
else
q.setString("cedula", "%"); // tx.commit();

exists = q.list();

Hibernate.closeSession();

Full stack trace of any exception that occurs:

Name and version of the database you are using:
MySQL, version: 4.1.14-nt
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Hello everyone:

My problem is the following:

I'm developing a app for a Gym (Clients control, Accounting staff, etc...). I decided to use hibernate integrated with a SWT application.

I always ran the test using only 1 machine, but today testing the app with 2 computer I realized that some changes made with one client to the database are not read by the other client.

I set the caches to false so hibernate has to go the the db for a query.
But the result is the un-expected.

I hope someone can help me.

Regards
Thanks
Pablo


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.