... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-08-28

ALDSP Primary Key Not Provided

I got to the bottom of the exception "Primary key attribute ... on Object ... not provided".  It is caused when you insert boilerplate XML container elements in your DTO.  For example, if the document looks like this:

<Item id="1" type="1">
  <PropertyList>
    <Property id="1" value="2"/>
    ...

and the Item element is mapped to the parent table and the Property element is mapped to the child table, then you will get the exception.  However, if you delete the organizing element PropertyList:

<Item id="1" type="1">
  <Property id="1" value="2"/>
  ...

then the mapping works properly and updates will work.

Blog Archive