You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Sherwood <js...@rgisolutions.com> on 2009/01/27 13:51:15 UTC
Not able to save objects at a certain point
Hello,
I am using the in place editor component created in the tapestry for non
believers tutorial.
http://www.infoq.com/articles/tapestry5-intro
In the setEdit() method in my java I am trying to do _session.save(Object)
but it will not save. I have tried @CommitAfter as well as creating and
committing a transaction using the
session(session.beginTransaction/session.getTransaction.commit). Is there a
reason it will not save at this point because the values are being filled in
correctly and I check after the save to see if the values are still correct
in the object and they are, the save just does not happen.
--James
Re: Not able to save objects at a certain point
Posted by Ulrich Stärk <ul...@spielviel.de>.
That's normal Hibernate behaviour. I suggest to read the Hibernate docs
if you plan to integrate Hibernate into your application.
Cheers,
Uli
James Sherwood schrieb:
> Hello,
>
> I figured it out.
>
> Apparently if it's an existing object you need to use
> _session.saveOrUpdate(Object), or at least that fixed it for me.
>
> An error should be thrown if it's not able to save IMO.
>
> --James
>
> -----Original Message-----
> From: James Sherwood [mailto:jsherwood@rgisolutions.com]
> Sent: January-27-09 8:51 AM
> To: 'Tapestry users'
> Subject: Not able to save objects at a certain point
>
> Hello,
>
>
>
> I am using the in place editor component created in the tapestry for non
> believers tutorial.
>
> http://www.infoq.com/articles/tapestry5-intro
>
>
>
> In the setEdit() method in my java I am trying to do _session.save(Object)
> but it will not save. I have tried @CommitAfter as well as creating and
> committing a transaction using the
> session(session.beginTransaction/session.getTransaction.commit). Is there a
> reason it will not save at this point because the values are being filled in
> correctly and I check after the save to see if the values are still correct
> in the object and they are, the save just does not happen.
>
>
>
>
>
> --James
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: Not able to save objects at a certain point
Posted by James Sherwood <js...@rgisolutions.com>.
Hello,
I figured it out.
Apparently if it's an existing object you need to use
_session.saveOrUpdate(Object), or at least that fixed it for me.
An error should be thrown if it's not able to save IMO.
--James
-----Original Message-----
From: James Sherwood [mailto:jsherwood@rgisolutions.com]
Sent: January-27-09 8:51 AM
To: 'Tapestry users'
Subject: Not able to save objects at a certain point
Hello,
I am using the in place editor component created in the tapestry for non
believers tutorial.
http://www.infoq.com/articles/tapestry5-intro
In the setEdit() method in my java I am trying to do _session.save(Object)
but it will not save. I have tried @CommitAfter as well as creating and
committing a transaction using the
session(session.beginTransaction/session.getTransaction.commit). Is there a
reason it will not save at this point because the values are being filled in
correctly and I check after the save to see if the values are still correct
in the object and they are, the save just does not happen.
--James
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org