3 Replies Latest reply on Jul 9, 2008 4:51 PM by ig rek

    Persist a List

    ig rek Newbie

      Hi
      i have a problem to persist a list


         ... 
          @OneToMany(fetch = FetchType.LAZY)
          @JoinColumn(name ="notificationId")
          private List<Notification> notification;
      ...



      ...
               <h:selectManyCheckbox id="notificat" required="true" value="#{registration.selectedNotifications}" converter="javax.faces.Long">
                  <s:selectItems value="#{notifications}" var="notif" label="#{notif.name}" itemValue="#{notif.notificationId}" />    
               </h:selectManyCheckbox>       
      ...




      ...
         @In(required=false)
         private List<Notification> selectedNotifications;
      ...
       ContactNotification contactNotif = new ContactNotification();   
      ...
      contactNotif.setNotification(selectedNotifications); 
      ...
      em.persist(contactNotif); 
      ...   



      I have a NULL value in the database when I persist, what is wrong?