You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Uday Kari (Created) (JIRA)" <ji...@apache.org> on 2012/04/12 12:21:18 UTC

[jira] [Created] (TAP5-1899) Tapestry BeanEditor should follow Persistence @Embedded

Tapestry BeanEditor should follow Persistence @Embedded 
--------------------------------------------------------

                 Key: TAP5-1899
                 URL: https://issues.apache.org/jira/browse/TAP5-1899
             Project: Tapestry 5
          Issue Type: Improvement
          Components: quickstart, tapestry-hibernate, tapestry-jpa
    Affects Versions: 5.3.2
            Reporter: Uday Kari
            Priority: Minor


Quick Intro:  

http://tapestry.1045711.n5.nabble.com/hibernate-Embedded-td2435807.html

If an entity has an embedded entity which in turn has an embedded entity and so on...hibernate is able to generate a database table for the highest level entity using the properties of embedded entities.  The corresponding create page in T5 should simply be, <t:beaneditform object="highestLevelEntity"/>  and the list page should simply be <t:grid source="highestLevelEntities"/>.  

Right now the embedded entities do not showing up unless 

1) bean model is customized for rendering the embedded entities.  This means T5 gets in the way and adds a parallel interpretation to whatever hibernate is doing per JPA
2) the highest level entity features getters and setters to wrap the embedded entities 
3) use Struts style dot notation to directly address embedded entities

All of these approaches violate "Code Less, Deliver More".  And this can be solved by using the principle "Follow Hibernate".  Just read directly from the database just Hibernate successfully created and then used the @Embedded hierarchy to build the object model.  

There may be a case for arbitrary embdedded properties to be exposed only through bean model to the presentation layer...but for something being processed just fine by persistence layer, T5 should facilitate it as well.  

Lastly, this would really help quickstart a real world application.  Otherwise T5 just replaces a whole lot of coding elsewhere.  





--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira