some fixes

added ClassMetadata to migration
fixed getAll query if no index is set
fixed notSaved for embedded documents