1 Reply Latest reply on Jun 29, 2007 10:58 AM by toni

    Persting an Array of Strings

    toni

      Hi,

      I'm using Entity beans with seam in my webapplication. I would like to persist an Array of Strings as follows:

      @OneToMany(cascade = {CascadeType.ALL})
      Collection descriptions = new ArrayList();

      This is not working so. I get an error message. Of course I could introduce another Entity bean, which only contains a String.

      However, I was wondering whether or not it is possible to directly save the strings?

        • 1. Re: Persting an Array of Strings
          toni

          The copy and paste removed the important part in the code. Here it comes again:

           /* @OneToMany(cascade = {CascadeType.ALL})
           Collection<String> descriptions = new ArrayList<String>();*/