2 Replies Latest reply on Dec 7, 2008 12:03 AM by luxspes

    Test seam-gen against a full real world database model

      I think Seam-gen should be tested against a full real world database models, to reduce its shortcomings (recursion, inheritance, complex primary keys,etc) in an easier way.


      Any proposals?

        • 1. Re: Test seam-gen against a full real world database model

          How about the Caveat Emptor model?

          • 2. Re: Test seam-gen against a full real world database model

            Found some problems, here are some of them:



            • Seam-gen is not smart enough to detect if an @Entity is abstract and therefore I can only have a List to do queries, but not a Home because you can not instantiate it. It would be extra-nice if it could be smart enougth to call the Editor/View of the subclasses from the List of the parent abstract class (for the creation of new rows).

            • Same problem with @Entity with private constructors.

            • If a @ManyToOne or @OneToMany only has the getter defined in code (but the setter does not exist or is private) seam-gen should try to deal with it only in a read only form instead of producing code that does not compile.

            • If an object has 2 relationships with another: Shipment -> seller -> User, Shipmet ->buyer-> User the generated code uses the name of the @Entity instead of the name of the relationship of the @In of UserHome in ShipmentHome, and therefore they are generated with the same name, that of course, does not compile.

            • BankAccout and CreditCard inherit fields from BillingDetails, but the inherited fields are not generated in the .xhtml forms.