Loading ...
Sorry, an error occurred while loading the content.

1948Re: [xml-dbms] problem moving from table based mapping to object relational mapping

Expand Messages
  • Ronald Bourret
    Feb 1, 2002
      AffariMultilivello wrote:

      > Now I have to switch to object-relational mapping, so my SAMPLE.XML
      > has been modified and now has this structure:

      <snip text="xml document" />

      > I have consequently modified the SAMPLE_MAP.XML in this way

      <snip text="map document" />

      > but even if I try to add
      > <RelatedClass KeyInParentTable="Candidate">
      > <ElementType Name="DATAW_MECC"/>
      > </RelatedClass>
      > inside the 'DATAW_SEA CLASSMAP' it doesn't insert into DATAW_MECC
      > Should I define a Foreign Key, or what else?

      Yes. You need to define both a candidate key and a foreign key.

      For example, your current tables are:

      "nr_container", "azienda", "data"

      "codcliente", "data"

      If nr_container is the primary key of data_sea, then you need to add
      this to as a foreign key of dataw_mecc:

      "nr_container", "azienda", "data"

      "nr_containerFK", "codcliente", "data"

      and specify it in the map:

      <RelatedClass KeyInParentTable="Candidate">
      <ElementType Name="DATAW_MECC"/>
      <Column Name="nr_container" />
      <Column Name="nr_containerFK" />

      > ....looking forward to insert 1.000.000records with XMLDBMS

      1.000.000 records! Let me know how it works.

      -- Ron
    • Show all 2 messages in this topic