2 Replies Latest reply on Feb 24, 2009 11:40 AM by Robert Grampp

    Best practice? - table default values, form with not all entity members

    Robert Grampp Newbie
      Hi everybody,

      this is my first post in this forum.
      I'm on the beginner steps with Seam. I was working before some years with JSPs, taglibs and an own framework, a bit with MyFaces.

      I have a second form (beside the seam generated) for editing only some members of an entity.
      Since the members which are not present in the form and are defined with @NotNull obviously I get Nullpointerexecption on submitting if I don't write my own action handler.

      What is the best practice to handle table column default values?
      - first: in defining the entity - there is no annotation for a default value (only that "ugly way" with a - proprietary - DDL part using columnDefinition) and I don't want to set the default column manually at db level; I want the table to be generated by Hibernate (hibernate.hbm2ddl.auto = "update")
      - secondly: in form/action handling?