Hello
Found the following problem:
The Table tState contains different states, set by us (the user can't change them). One state has the primary key 0 (MSSQL).
Aurelius throw now an exception if I read the id over a joined table:
contract.State.ID or contract.State.getID