Hi,

Basic question is - how does on persist a Java
Collection datatype to a postrgest table using jdo?

I am trying to persist a Collection property in a
bean, to a postgresql db, using JDO, but don't know
the datatype to use for this field in the table, and
also in the repository.xml.

I am using the following functions in the binding file
and (by means of the debug statement) see that the
correct values come through from my test bean (which
is currently non-persistent).

    <fb:javascript id="multivaluewidget" path="."
direction="load">
      <fb:load-form>
      var bean = jxpathPointer.getNode(); 
      var selection = bean.getUserChoices();
      java.lang.System.out.println("from the load
action in the binding, the bean values are: " +
bean.toString());
      widget.setValue(selection);
      java.lang.System.out.println("Selection is: " +
selection);
     </fb:load-form>
    </fb:javascript>

     <fb:javascript id="multivaluewidget" path="."
direction="save">
       <fb:save-form>
         var formValue = widget.getValue();
         var collection = new java.util.ArrayList();
         for(var i=0; i&lt;formValue.length; i++) {
           collection.add(new
java.lang.Integer(formValue[i]));
         }
         var bean = jxpathPointer.getNode();
         bean.setUserChoices(collection);
       </fb:save-form>
     </fb:javascript>

What datatypes should I use in the table and
repository.xml?  

I tried integer[] for the column data type and ARRAY
in the repository.xml, and various combinations, but
am not having much success....

Basic question is - how does on persist a collection
to a postrgest table using jdo?

thx
Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to