{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab/issues/3248","labels_url":"https://api.github.com/repos/openhab/openhab/issues/3248/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab/issues/3248/comments","events_url":"https://api.github.com/repos/openhab/openhab/issues/3248/events","html_url":"https://github.com/openhab/openhab/pull/3248","id":109706603,"number":3248,"title":"New generic JDBC Persistence Service","user":{"login":"lewie","id":5707426,"avatar_url":"https://avatars.githubusercontent.com/u/5707426?v=3","gravatar_id":"","url":"https://api.github.com/users/lewie","html_url":"https://github.com/lewie","followers_url":"https://api.github.com/users/lewie/followers","following_url":"https://api.github.com/users/lewie/following{/other_user}","gists_url":"https://api.github.com/users/lewie/gists{/gist_id}","starred_url":"https://api.github.com/users/lewie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewie/subscriptions","organizations_url":"https://api.github.com/users/lewie/orgs","repos_url":"https://api.github.com/users/lewie/repos","events_url":"https://api.github.com/users/lewie/events{/privacy}","received_events_url":"https://api.github.com/users/lewie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openhab/openhab/labels/new-binding-action-service","name":"new-binding-action-service","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-04T21:43:08Z","updated_at":"2015-10-08T14:31:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openhab/openhab/pulls/3248","html_url":"https://github.com/openhab/openhab/pull/3248","diff_url":"https://github.com/openhab/openhab/pull/3248.diff","patch_url":"https://github.com/openhab/openhab/pull/3248.patch"},"body":"[Her you go to pre Release DBMS](https://github.com/openhab/openhab/issues/3147)\r\nDBMS is renamed to JDBC and is is much smaller, faster, cleaner code and easier to extend than the first attempt."},"comment":{"url":"https://api.github.com/repos/openhab/openhab/issues/comments/146564050","html_url":"https://github.com/openhab/openhab/pull/3248#issuecomment-146564050","issue_url":"https://api.github.com/repos/openhab/openhab/issues/3248","id":146564050,"user":{"login":"lewie","id":5707426,"avatar_url":"https://avatars.githubusercontent.com/u/5707426?v=3","gravatar_id":"","url":"https://api.github.com/users/lewie","html_url":"https://github.com/lewie","followers_url":"https://api.github.com/users/lewie/followers","following_url":"https://api.github.com/users/lewie/following{/other_user}","gists_url":"https://api.github.com/users/lewie/gists{/gist_id}","starred_url":"https://api.github.com/users/lewie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewie/subscriptions","organizations_url":"https://api.github.com/users/lewie/orgs","repos_url":"https://api.github.com/users/lewie/repos","events_url":"https://api.github.com/users/lewie/events{/privacy}","received_events_url":"https://api.github.com/users/lewie/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T14:31:08Z","updated_at":"2015-10-08T14:31:08Z","body":"Found a real bad Problem,\r\n\r\nSome time ago, I had very long decimals when data comes from 'double' in databases.\r\nTherefore, I then introduced in my PostgreSQL bundle the parameter 'numberDecimalcount'.\r\nRounding aka 'numberDecimalcount' is off at the moment, so decimals are back... \r\n\r\n\r\nUsing double for Numbers causes (as in Mysql bundle) rounding trouble without end.\r\nFor Example 1.005 can not be represented in binary floating point double in java.\r\nHave a look at this discussion: http://stackoverflow.com/questions/153724/how-to-round-a-number-to-n-decimal-places-in-java\r\n\r\nIt seams the only right way, OpenHab 'DecimalType' not to save it as a 'DOUBLE' but as a jdbc-type 'NUMERIC' and 'DECIMAL'. The Java equivalent is 'BigDecimal'. OpenHab DecimalType holds its data as BigDecimal anyway.\r\n\r\n 1. We would loose backwards compatibility to MYSQL bundel or it has to be programmed a converter/switch.\r\n 2. It is never as fast as now.\r\n\r\nAny suggestions?\r\nI think we want to do it right?\r\n\r\nRgds\r\nHelmut"}}