fixed null/notnull
fixed deep relations
fixed tests after refactoring