[relationships] fixed support for removing entities
[entity] attach injects Metadata
[entity] proper check if isPersisted()
[entity] fixed suppor for conposite primary key
[entity] implemented serialization draft support
typo