{"action":"created","issue":{"url":"https://api.github.com/repos/oasp/oasp4j/issues/317","labels_url":"https://api.github.com/repos/oasp/oasp4j/issues/317/labels{/name}","comments_url":"https://api.github.com/repos/oasp/oasp4j/issues/317/comments","events_url":"https://api.github.com/repos/oasp/oasp4j/issues/317/events","html_url":"https://github.com/oasp/oasp4j/issues/317","id":113533650,"number":317,"title":"Entity ID Generator Sequence","user":{"login":"dchiarad","id":9334209,"avatar_url":"https://avatars.githubusercontent.com/u/9334209?v=3","gravatar_id":"","url":"https://api.github.com/users/dchiarad","html_url":"https://github.com/dchiarad","followers_url":"https://api.github.com/users/dchiarad/followers","following_url":"https://api.github.com/users/dchiarad/following{/other_user}","gists_url":"https://api.github.com/users/dchiarad/gists{/gist_id}","starred_url":"https://api.github.com/users/dchiarad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchiarad/subscriptions","organizations_url":"https://api.github.com/users/dchiarad/orgs","repos_url":"https://api.github.com/users/dchiarad/repos","events_url":"https://api.github.com/users/dchiarad/events{/privacy}","received_events_url":"https://api.github.com/users/dchiarad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/oasp/oasp4j/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/oasp/oasp4j/labels/persistence","name":"persistence","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/oasp/oasp4j/milestones/16","html_url":"https://github.com/oasp/oasp4j/milestones/backlog-asap","labels_url":"https://api.github.com/repos/oasp/oasp4j/milestones/16/labels","id":1350537,"number":16,"title":"backlog-asap","description":"Issues that are not yet assigned to a release, but have most urgency for one of the next releases.","creator":{"login":"MarcoRose","id":10845524,"avatar_url":"https://avatars.githubusercontent.com/u/10845524?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcoRose","html_url":"https://github.com/MarcoRose","followers_url":"https://api.github.com/users/MarcoRose/followers","following_url":"https://api.github.com/users/MarcoRose/following{/other_user}","gists_url":"https://api.github.com/users/MarcoRose/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoRose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoRose/subscriptions","organizations_url":"https://api.github.com/users/MarcoRose/orgs","repos_url":"https://api.github.com/users/MarcoRose/repos","events_url":"https://api.github.com/users/MarcoRose/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoRose/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":5,"state":"open","created_at":"2015-10-12T10:13:33Z","updated_at":"2015-11-19T11:02:42Z","due_on":"2016-12-30T23:00:00Z","closed_at":null},"comments":3,"created_at":"2015-10-27T08:53:49Z","updated_at":"2015-11-20T15:54:28Z","closed_at":null,"body":"I have created a new project by using the OASP template. My underlying database is MySQL which does not support database sequences. The problem is AbstractPersistenceEntity forces you to use the sequence generator on your entities even though the database does not support this kind of generator. In the end I had to cut the inheritance of my entities so that I can define the id and generator type in my ApplicationPersistenceEntity.\r\n\r\nHowever, from my point of view there should be more freedom on how to created the primary id for entities."},"comment":{"url":"https://api.github.com/repos/oasp/oasp4j/issues/comments/158439976","html_url":"https://github.com/oasp/oasp4j/issues/317#issuecomment-158439976","issue_url":"https://api.github.com/repos/oasp/oasp4j/issues/317","id":158439976,"user":{"login":"ivanderk","id":15649885,"avatar_url":"https://avatars.githubusercontent.com/u/15649885?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanderk","html_url":"https://github.com/ivanderk","followers_url":"https://api.github.com/users/ivanderk/followers","following_url":"https://api.github.com/users/ivanderk/following{/other_user}","gists_url":"https://api.github.com/users/ivanderk/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanderk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanderk/subscriptions","organizations_url":"https://api.github.com/users/ivanderk/orgs","repos_url":"https://api.github.com/users/ivanderk/repos","events_url":"https://api.github.com/users/ivanderk/events{/privacy}","received_events_url":"https://api.github.com/users/ivanderk/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T15:54:27Z","updated_at":"2015-11-20T15:54:27Z","body":"Unfortunately, I don´t think it is possible to \"override\" the PK definition in the base class. I´ve tried it in several ways and it resulted in different errors. So we choose the same solution as @dchiarad and not inherit AbstractPersistenceEntity in order to support MySql. I would argue that best practice determines that the PK should not be defined in a framework-level base class.\r\n\r\nMySql may not be ideal, far from it, but it is a [db engine in wide use](http://db-engines.com/en/ranking)\r\nSo we cannot be ignoring it. "}}