adding primaryobject contraints and fixing dbseqnum gets