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

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

With the included entity the startup of the TestApp0 should fail with a 
nullpointer exception (runTestApp0) without the fix. 

 

It's this line: 
org/apache/tapestry5/hibernate/web/modules/HibernateModule.java:107
{code:java}
 SingularAttribute<?, ?> id = 
entityType.getId(entityType.getIdType().getJavaType()); {code}
.getIdType() returns null for compound id entities.

 

It would probably be good to mention it in the documentation.

> 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
>            Assignee: Ben Weidig
>            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