[jboss-user] [JBoss Seam] - Why does EntityQuery auto save updates?

terryb do-not-reply at jboss.com
Tue Nov 20 10:51:25 EST 2007


Seems there is a link between EntityHome.instance() and EntityQuery or both refer to same instance of Entity?

My changes get updated to database when I 'execute a query' to get current data in database.

I have a jsf form based on EntityHome which updates few fields. Before committing changes to database I would like to compare values in database with values changed by the user. Therefore, I execute query -attached-. But I noticed, running query first committs my changes to database and then query it back.

Is it possible to stop this behaviour? so what else can I do? 

Seam 1.2.1GA.


  | Query that auto updates Client
  | EntityQuery query = new EntityQuery();
  | query.setEjbql("select client from Client client where lower(id)=lower('"+ id + "')");
  | List<Client> client = query.getResultList();
  | 
  | 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106438#4106438

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106438



More information about the jboss-user mailing list