Hi,
the right way to persist a collection in JDO is to create a class for
the purpose with a collection member:
class MyClass
{
Vector collToPersist;
}
Then enhance the class and define the .jdo files and map the class to database.
What JDO implementation you are using?
On Sat, 9 Oct 2004 12:01:22 -0700 (PDT), Paul Joseph
<[EMAIL PROTECTED]> wrote:
> Thank you very much for the reply. I think I
> understand your method.
>
> To simplify things however, I would like to save the
> users selection as a column in the same table (parent)
> and not in a separate table (child)
>
> Thus the column will get data like [1,4] from the
> multivalue widget, if the user chooses item ids 1,4 in
> the multiselect.
>
> The widget is using a set method in the fb:save that
> sets a property that is a Java Collection.
>
> My debug statments indicate it is trying to save
> something like this [1,4] or [3,6,8] and so on.
>
> so, to be more clear, I am trying to save a property
> of type java.util.Collection in a column of table
> Parent, in a postgresql db.
>
> thx
> Paul
>
>
> --- Joose Vettenranta <[EMAIL PROTECTED]> wrote:
>
> > >
> > > Basic question is - how does on persist a
> > collection
> > > to a postrgest table using jdo?
> >
> > Normally collection is just a 1:n connection to
> > another table, like
> >
> > create table parent (id integer);
> > create table child (id integer, parent integer);
> >
> > so you map parent to have collection Childs and then
> > that Childs
> > collection you map to be of that child table.
> >
> > - Joose
> >
> > --
> > "Always remember that you are unique, just like
> > everyone else!"
> > * http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561
> > 0270 *
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
bye,
Luca Garulli
www.OrienTechnologies.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]