{"action":"created","issue":{"url":"https://api.github.com/repos/javalite/activejdbc/issues/409","labels_url":"https://api.github.com/repos/javalite/activejdbc/issues/409/labels{/name}","comments_url":"https://api.github.com/repos/javalite/activejdbc/issues/409/comments","events_url":"https://api.github.com/repos/javalite/activejdbc/issues/409/events","html_url":"https://github.com/javalite/activejdbc/issues/409","id":94990531,"number":409,"title":"Improve model flexiblility for inheritance","user":{"login":"vyemialyanchyk","id":642868,"avatar_url":"https://avatars.githubusercontent.com/u/642868?v=3","gravatar_id":"","url":"https://api.github.com/users/vyemialyanchyk","html_url":"https://github.com/vyemialyanchyk","followers_url":"https://api.github.com/users/vyemialyanchyk/followers","following_url":"https://api.github.com/users/vyemialyanchyk/following{/other_user}","gists_url":"https://api.github.com/users/vyemialyanchyk/gists{/gist_id}","starred_url":"https://api.github.com/users/vyemialyanchyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vyemialyanchyk/subscriptions","organizations_url":"https://api.github.com/users/vyemialyanchyk/orgs","repos_url":"https://api.github.com/users/vyemialyanchyk/repos","events_url":"https://api.github.com/users/vyemialyanchyk/events{/privacy}","received_events_url":"https://api.github.com/users/vyemialyanchyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-07-14T16:55:40Z","updated_at":"2015-07-14T20:43:52Z","closed_at":null,"body":"Model has next private members:\r\n```java\r\nprivate Map<String, Object> attributes = new CaseInsensitiveMap<Object>();\r\nprivate final Set<String> dirtyAttributeNames = new CaseInsensitiveSet();\r\nprivate final Map<Class, Model> cachedParents = new HashMap<Class, Model>();\r\nprivate final Map<Class, List<Model>> cachedChildren = new HashMap<Class, List<Model>>();\r\n```\r\n\r\nHashMap is not a best choice for efficiency (in general CaseInsensitiveMap is the same HashMap). 'private' declaration here does not allow to select more effective structures. Is it possible to update Model so to get more flexible for extension? 'protected' or argument in constructor or setter would helps."},"comment":{"url":"https://api.github.com/repos/javalite/activejdbc/issues/comments/121379004","html_url":"https://github.com/javalite/activejdbc/issues/409#issuecomment-121379004","issue_url":"https://api.github.com/repos/javalite/activejdbc/issues/409","id":121379004,"user":{"login":"ipolevoy","id":500941,"avatar_url":"https://avatars.githubusercontent.com/u/500941?v=3","gravatar_id":"","url":"https://api.github.com/users/ipolevoy","html_url":"https://github.com/ipolevoy","followers_url":"https://api.github.com/users/ipolevoy/followers","following_url":"https://api.github.com/users/ipolevoy/following{/other_user}","gists_url":"https://api.github.com/users/ipolevoy/gists{/gist_id}","starred_url":"https://api.github.com/users/ipolevoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipolevoy/subscriptions","organizations_url":"https://api.github.com/users/ipolevoy/orgs","repos_url":"https://api.github.com/users/ipolevoy/repos","events_url":"https://api.github.com/users/ipolevoy/events{/privacy}","received_events_url":"https://api.github.com/users/ipolevoy/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T20:43:52Z","updated_at":"2015-07-14T20:43:52Z","body":"Vitali, what you are suggesting is performance improvement. From my experience, in a complex application this is not a simple answer, and refactoring something without any evidence is just wasting time. I too want to make ActivEJDBC better, and I'm not the only one: https://github.com/javalite/activejdbc/graphs/contributors. \r\n\r\nI'm not sure why you say there is too much effort for code contribution. Clone/code/submit pull request. \r\nPlease, see here for instructions: http://javalite.io/contributors\r\nHowever, in any case if this is a performance improvement, it needs to have basis: factual data that proves that your changes will make a difference. While theoretically you might be correct that another structure is faster than HashMap, but after you make your changes, nobody will notice any improvement. \r\n\r\nOracle Java Conventions are not the best IMHO, they are a good start, but I prefer a more terse style than Oracle/Sun.\r\n\r\nIf you want to discuss this further, find me on Skype: ipolevoy so we can talk face to face. \r\n\r\ntx2"}}