Re: T5: Hibernate/Session question

2009-02-05 Thread Sven Homburg
ok ;-) 2009/2/5 Thiago H. de Paula Figueiredo > Em Thu, 05 Feb 2009 17:07:24 -0300, Sven Homburg > escreveu: > > i prefer you to use the session.refresh >> > > This will overwrite your object, and sometimes you want it unchanged. As > always, the best option depends on the context. ;) > > -- >

Re: T5: Hibernate/Session question

2009-02-05 Thread Thiago H. de Paula Figueiredo
Em Thu, 05 Feb 2009 17:07:24 -0300, Sven Homburg escreveu: i prefer you to use the session.refresh This will overwrite your object, and sometimes you want it unchanged. As always, the best option depends on the context. ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, de

Re: T5: Hibernate/Session question

2009-02-05 Thread Sven Homburg
February-05-09 4:48 PM > To: Tapestry users > Subject: Re: T5: Hibernate/Session question > > Em Thu, 05 Feb 2009 15:59:53 -0300, James Sherwood > escreveu: > > > Thanks, > > > > I do not want to have to change the actual POJOs as I generate them using > > reve

Re: T5: Hibernate/Session question

2009-02-05 Thread Thiago H. de Paula Figueiredo
Em Thu, 05 Feb 2009 16:58:39 -0300, James Sherwood escreveu: Hello, Hi! I used session.update(Object) and it worked, is there any difference? session.update(Object) writes the object to the database, session.lock() not. Both associate the object to the session, so use one or the other

RE: T5: Hibernate/Session question

2009-02-05 Thread James Sherwood
Hello, I used session.update(Object) and it worked, is there any difference? --James -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: February-05-09 4:48 PM To: Tapestry users Subject: Re: T5: Hibernate/Session question Em Thu, 05 Feb 2009 15:59

Re: T5: Hibernate/Session question

2009-02-05 Thread Thiago H. de Paula Figueiredo
Em Thu, 05 Feb 2009 15:59:53 -0300, James Sherwood escreveu: Thanks, I do not want to have to change the actual POJOs as I generate them using reverse eng so I think I will just do the lookup.\ One solution is to call session.lock(object, LockMode.NONE) before reading any property values

RE: T5: Hibernate/Session question

2009-02-05 Thread James Sherwood
:23 PM To: Tapestry users Subject: Re: T5: Hibernate/Session question there are two possible solutions: first: you declare the collection for childobjects "read not lazy" second: you attach the parentobject to a new session and re-read the childobjects collection 2009/2/5 Jame

Re: T5: Hibernate/Session question

2009-02-05 Thread Sven Homburg
there are two possible solutions: first: you declare the collection for childobjects "read not lazy" second: you attach the parentobject to a new session and re-read the childobjects collection 2009/2/5 James Sherwood > Hello, > > > > I have an application state object(Visit) that is storing

T5: Hibernate/Session question

2009-02-05 Thread James Sherwood
Hello, I have an application state object(Visit) that is storing a hibernate entity object. In a page I ask for the visit.object.getchildobject.name and receive this error: [ERROR] hibernate.LazyInitializationException could not initialize proxy - the owning Session was closed org.hibe