Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1899

Tapestry BeanEditor should follow Persistence @Embedded

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            netdawg Uday Kari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: