[ 
https://issues.apache.org/jira/browse/TAP5-2783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17864059#comment-17864059
 ] 

Hendrik Noot commented on TAP5-2783:
------------------------------------

I created the pull request. I wanted to provide a test as well, but I don’t 
know how to create a simple test for the module setup. Instead, I added an 
entity with a compound id to the TestApp0 application. You can see the error 
during initialization without the fix in the HibernateModule 
(entityType.getIdType() is null).

While doing this I encountered two problems with the test application, that are 
unrelated to this issue:
 # The first call to the page “encodeentities/1” after startup creates an 
exception, later calls are fine, except if problem 2 triggers:
Exception assembling embedded component 'createentity' (of type 
org.apache.tapestry5.corelib.components.EventLink, within EncodeEntities): 
Unable to instantiate instance of transformed class 
org.apache.tapestry5.corelib.components.EventLink: 
java.lang.reflect.InvocationTargetException
 # Often calls to session.createQuery return null. See TAP5-2754 

> Hibernate module initialization fails when entities with compound ids exist
> ---------------------------------------------------------------------------
>
>                 Key: TAP5-2783
>                 URL: https://issues.apache.org/jira/browse/TAP5-2783
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-hibernate
>    Affects Versions: 5.8.6
>            Reporter: Hendrik Noot
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The Tapestry Hibernate module throws a null pointer exception during 
> initialization when entities with compound ids exist and it tries to build a 
> value encoder for such an entity. This is because the implementation is 
> specific to entities with a single id, so it never worked.
> This could be solved by ignoring these entities or implementing support for 
> compound ids. 
> Since no one filed a bug for this yet I would suggest ignoring them and will 
> provide a pull request.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to