Hi,

The JDO specification provides mandatory or optional support for most
of the collection types provided by the JDK.  For other types, like
scala.collection.immutable.List, you would have to look at your chosen
implementation for support.

I noticed that you indicated that the JPOX enhancer is in use.  FYI,
JPOX is now DataNucleus (www.datanucleus.org), the reference
implementation for JDO, which is known to support many other types
that just those called for by the specification.

HTH,
Matthew

On Mon, Feb 7, 2011 at 5:51 PM, Myoungkyu Song <mks...@vt.edu> wrote:
> Hello,
>
> I would like to ask about the one-to-many relationship in JDO. The
> below code is a actual working code.
> Instead of using 'java.util.List', what if I use a special List, for
> example 'scala.collection.immutable.List'
> as a collection? As my test, jpox enhancer said, "..has been defined
> with "collection" MetaData yet is not a Collection Field."
>
> Best regards,
> Myoungkyu
>
> ================================================
> * in the java class:
> ------------------------------------------------------------------------------------------------
> import java.util.List;
>
> List<ChildModel> children;
> ------------------------------------------------------------------------------------------------
> *.jdo XML file:
> ------------------------------------------------------------------------------------------------
> <class ...>
>   ...
>   <field name="children" persistence-modifier="persistent">
>       <collection element-type="scalajdo.ChildModel"/>
>       <join/>
>   </field>
> </class>
>
> <class name="ChildModel" table="CHILDMODEL" identity-type="application">
>       <field name="modelId" persistence-modifier="persistent"
> primary-key="true">
>               <column name="MODELID"/>
>       </field>
>
>  <field name="value" persistence-modifier="persistent">
>       <column name="VALUE"/>
>  </field>
> </class>
> ================================================
>



-- 
mailto:matt...@matthewadams.me
skype:matthewadams12
yahoo:matthewadams
aol:matthewadams12
google-talk:matthewadam...@gmail.com
msn:matt...@matthewadams.me
http://matthewadams.me
http://www.linkedin.com/in/matthewadams

Reply via email to