Regarding avoiding @Persist, it's discussed here:
http://jumpstart.doublenegative.com.au/jumpstart7/examples/state/storingdataina
If you look around JumpStart you'll find almost all of it has been written
without needing @Persist.
Geoff
On 12 Feb 2015, at 10:58 pm, Poggenpohl, Daniel
<daniel.poggenp...@isst.fraunhofer.de> wrote:
> Hi,
>
> thanks for your help. I still have some questions (and will probably change
> the primary key to a non-compound one).
>
>> tapestry-hibernate doesn't support compound primary keys out-of-the-box.
>
> My project depends on "tapestry-jpa", because we didn't want to introduce any
> hibernate-specific implementations. Although the persistence provider is
> still hibernate, using a dependency to "hibernate-entitymanager".
> What I'm wondering just now is if this could cause any problems doing it this
> way?
>
>> Another recommendation: avoid using @Persist, even more in components.
>
> Why should I avoid it? Does it produce bugs, slow performance or high memory
> consumption?
>
>> You're invoking session.merge().
>
> Am I understanding you correct that EntityManager.merge() using hibernate as
> the persistence provider is a wrapper around Session.merge(), which is
> hibernate-specific?
> And do you mean that the entity hasn't been persisted in this session and
> therefore it is perceived as transient?
>
> Regards,
> Daniel Poggenpohl
>
> -----Ursprüngliche Nachricht-----
> Von: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com]
> Gesendet: Donnerstag, 12. Februar 2015 12:30
> An: Tapestry users
> Betreff: Re: Problem using IdClass and updating entities using a component
>
> On Thu, 12 Feb 2015 08:45:34 -0200, Poggenpohl, Daniel
> <daniel.poggenp...@isst.fraunhofer.de> wrote:
>
>> Hello,
>
> Hi!
>
>> I have described a problem I'm having on
>> http://stackoverflow.com/questions/28473491/tapestry-5-3-8-jetty-hiber
>> nate-4-3-5-xampp-1-8-3-idclass-uses-derived
>
> When posting a question on this mailing list, please include here the details.
>
>> . At the moment I'm trying to find out
>> - if the above problem has a solution
>
> Yes: don't use compound (non-integer, non-database-generated) primary keys
> unless you're dealing with legacy databases. It's a lot of pain and decreased
> performance for no gain. It really amazes me how people still use it.
> tapestry-hibernate doesn't support compound primary keys out-of-the-box.
> Another recommendation: avoid using @Persist, even more in components.
>
>> - if properties containing entities can be used as component
>> parameters
>
> Yes.
>
>> - why the entities are detached when I click the button
>
> Form submissions and event links are processed in another request, which is
> another thread, so the original Hibernate session was already closed.
>
>> - why the app is trying to persist the entities although they are
>> detached
>
> You're invoking session.merge().
>
>>
>> Any ideas?
>>
>> Regards,
>> Daniel Poggenpohl
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org