{"action":"created","issue":{"url":"https://api.github.com/repos/oracle/mobile-persistence/issues/5","labels_url":"https://api.github.com/repos/oracle/mobile-persistence/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/oracle/mobile-persistence/issues/5/comments","events_url":"https://api.github.com/repos/oracle/mobile-persistence/issues/5/events","html_url":"https://github.com/oracle/mobile-persistence/pull/5","id":67859670,"number":5,"title":"Issue#3 Fix - setIsNewEntity(false) function call is added in DBPersistenceManager::mergeChildren","user":{"login":"gcoban","id":2368878,"avatar_url":"https://avatars.githubusercontent.com/u/2368878?v=3","gravatar_id":"","url":"https://api.github.com/users/gcoban","html_url":"https://github.com/gcoban","followers_url":"https://api.github.com/users/gcoban/followers","following_url":"https://api.github.com/users/gcoban/following{/other_user}","gists_url":"https://api.github.com/users/gcoban/gists{/gist_id}","starred_url":"https://api.github.com/users/gcoban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcoban/subscriptions","organizations_url":"https://api.github.com/users/gcoban/orgs","repos_url":"https://api.github.com/users/gcoban/repos","events_url":"https://api.github.com/users/gcoban/events{/privacy}","received_events_url":"https://api.github.com/users/gcoban/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-12T01:50:08Z","updated_at":"2015-04-12T18:46:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/oracle/mobile-persistence/pulls/5","html_url":"https://github.com/oracle/mobile-persistence/pull/5","diff_url":"https://github.com/oracle/mobile-persistence/pull/5.diff","patch_url":"https://github.com/oracle/mobile-persistence/pull/5.patch"},"body":"Hey Steven,\r\n\r\nAs your suggestion, I have applied the local fix by adding child.setIsNewEntity(false) in DBPersistenceManager::mergeChildren function. I have tested and it works as my previous suggestion does.\r\n\r\nRegarding the the $revision_history$ lines at the top of the classes, I thought you are not going to change oracle.ateam.sample.mobile.persistence (v1) package any more. Therefore, I have applied the fix to only oracle.ateam.sample.mobile.v2.persistence package.\r\n\r\nYou can safely merge the fix now. Thanks for this great framework.\r\n\r\n#3 "},"comment":{"url":"https://api.github.com/repos/oracle/mobile-persistence/issues/comments/92099703","html_url":"https://github.com/oracle/mobile-persistence/pull/5#issuecomment-92099703","issue_url":"https://api.github.com/repos/oracle/mobile-persistence/issues/5","id":92099703,"user":{"login":"stevendavelaar","id":8916868,"avatar_url":"https://avatars.githubusercontent.com/u/8916868?v=3","gravatar_id":"","url":"https://api.github.com/users/stevendavelaar","html_url":"https://github.com/stevendavelaar","followers_url":"https://api.github.com/users/stevendavelaar/followers","following_url":"https://api.github.com/users/stevendavelaar/following{/other_user}","gists_url":"https://api.github.com/users/stevendavelaar/gists{/gist_id}","starred_url":"https://api.github.com/users/stevendavelaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevendavelaar/subscriptions","organizations_url":"https://api.github.com/users/stevendavelaar/orgs","repos_url":"https://api.github.com/users/stevendavelaar/repos","events_url":"https://api.github.com/users/stevendavelaar/events{/privacy}","received_events_url":"https://api.github.com/users/stevendavelaar/received_events","type":"User","site_admin":false},"created_at":"2015-04-12T18:46:23Z","updated_at":"2015-04-12T18:46:23Z","body":"Reading this only now...\nWill rethink but this isn't as big an issue as the PK error is.\nYou can easily add you validation logic to the saveEntity method in your \nown EntityCRUDService subclass.\n\nSteven.\n\nOn 12-4-2015 20:32, Gökhan Çoban wrote:\n>\n> Hi Steven,\n>\n> This local fix works well for primary key exist error but it doesn't \n> validate the child entities when the parent is not new entity. Well, \n> it throws SQLite step error if the child records have null values \n> where they should not.\n>\n> Also validateEntity is handled by EntityCRUDService; therefore, \n> DBPersistenceManager can not call it. You may rethink to handle \n> merging children in the EntityCRUDService.\n>\n> —\n> Reply to this email directly or view it on GitHub \n> <https://github.com/oracle/mobile-persistence/pull/5#issuecomment-92098665>.\n>\n\n-- \n\nSteven Davelaar| Consulting Solutions Architect\nOracle Cloud Solution Architects - \"A-Team\"\nTel +31 30 669 8113 | Mobile +31 6 55 33 24 28\nTwitter: @stevendavelaar\nA-Team Chronicles <http://www.ateam-oracle.com/>\n\n"}}