You are probably using the ObjectStoreId as the primary key of your table. This key is always unique within one object type.
In the Mendix runtime environment a GUID is used to identify all objects. The GUID is a unique nr over all object types. Two different objects can never have the same guid. But GUID change when you restart the XAS. So you can not used this as your identifier.
What you can do is create a hash based on your objecttype and generate the primary key something like this.
Long objectId = Long.valueOf(String.valueOf(PrijsGunningsvraag.getType().hashCode()) + String.valueOf(iMxObject.getId().getObjectStoreId()));
//Or if you want to do this reusable
Long objectId = Long.valueOf(String.valueOf(iMxObject.getType().hashCode()) + String.valueOf(iMxObject.getId().getObjectStoreId()));