fixed jackson serialization of not yet loaded lazy relations and tightened database constraints