{"action":"opened","issue":{"url":"https://api.github.com/repos/requery/requery/issues/199","repository_url":"https://api.github.com/repos/requery/requery","labels_url":"https://api.github.com/repos/requery/requery/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/requery/requery/issues/199/comments","events_url":"https://api.github.com/repos/requery/requery/issues/199/events","html_url":"https://github.com/requery/requery/issues/199","id":161256091,"number":199,"title":"strange fail on insert.... copy from 195","user":{"login":"danysz","id":1667904,"avatar_url":"https://avatars.githubusercontent.com/u/1667904?v=3","gravatar_id":"","url":"https://api.github.com/users/danysz","html_url":"https://github.com/danysz","followers_url":"https://api.github.com/users/danysz/followers","following_url":"https://api.github.com/users/danysz/following{/other_user}","gists_url":"https://api.github.com/users/danysz/gists{/gist_id}","starred_url":"https://api.github.com/users/danysz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danysz/subscriptions","organizations_url":"https://api.github.com/users/danysz/orgs","repos_url":"https://api.github.com/users/danysz/repos","events_url":"https://api.github.com/users/danysz/events{/privacy}","received_events_url":"https://api.github.com/users/danysz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-20T17:59:44Z","updated_at":"2016-06-20T17:59:44Z","closed_at":null,"body":"Hi\r\n\r\nI have an entity \r\n\r\n```\r\n@Entity\r\npublic interface Connection extends Parcelable, Persistable {\r\n\r\n    @Key\r\n    @Generated\r\n    int getId();\r\n\r\n    @Column(unique = true)\r\n    @Index(\"indexConnectionName\")\r\n    String getName();\r\n\r\n    @Column(unique = true)\r\n    @Index(\"indexSSID\")\r\n    String getSSID();\r\n\r\n    String getIPAddressLocal();\r\n\r\n    String getIPAddressRemote();\r\n\r\n    int getPortLocal();\r\n\r\n    int getPortRemote();\r\n\r\n    String getUserName();\r\n\r\n    String getPassword();\r\n\r\n    Long getVBoxLastUpdate();\r\n\r\n    @OneToMany(mappedBy = \"connection\", cascade = {CascadeAction.DELETE, CascadeAction.SAVE})\r\n    List<Floor> getFloorsList();\r\n}\r\n\r\n```\r\n\r\nWhen I try to call insert on this kind of object for the second time in the \"data\" of ConnectionEntity the \"id\" is \"0\". For the second insert I got error that the \"id\" alreayd exist of course...\r\nWhat I am doing wrong ?\r\n\r\nContinue : \r\n\r\nOf course.. But in the software I make\r\nnew connection and it's created with 0 in id...\r\n\r\n`mConnectionEntity = new ConnectionEntity();\r\n`\r\n\r\nThis is the row that I try to use to create a new connection and insert it..\r\nFirst time is ok second time it fails.\r\n\r\n\r\n\r\nThanks\r\n\r\nDaniel"}}
{"actor":{"display_login":"danysz"}}