Accepted answer

In your table mapping, is the field marked as 'Auto Generated Value' in the Properties pane? I've had insert/update issues with that before... – Tieson T. Mar 7 at 6:52

I would give him the props for this, but he left this as a comment, and not an official answer.


I have seen something like this before.

It happens when you only assign the 'id' and not the related object.

Try the following:

new FileType
  FileCategory = def.Category,

Related Articles