replaced persist with a merge to safely create and update entities with relationships in the database
return the newly created entity after the merge
added integration tests and added property to include them when needed
added Gson json provider and tests
removed unused object reference