{"action":"closed","issue":{"url":"https://api.github.com/repos/speedment/speedment/issues/260","repository_url":"https://api.github.com/repos/speedment/speedment","labels_url":"https://api.github.com/repos/speedment/speedment/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/speedment/speedment/issues/260/comments","events_url":"https://api.github.com/repos/speedment/speedment/issues/260/events","html_url":"https://github.com/speedment/speedment/issues/260","id":176679130,"number":260,"title":"LongForeignKeyFieldImpl does not have trait.HasFinder - needed by JsonEncoderImpl.put with finder","user":{"login":"lawesson","id":21216357,"avatar_url":"https://avatars.githubusercontent.com/u/21216357?v=3","gravatar_id":"","url":"https://api.github.com/users/lawesson","html_url":"https://github.com/lawesson","followers_url":"https://api.github.com/users/lawesson/followers","following_url":"https://api.github.com/users/lawesson/following{/other_user}","gists_url":"https://api.github.com/users/lawesson/gists{/gist_id}","starred_url":"https://api.github.com/users/lawesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lawesson/subscriptions","organizations_url":"https://api.github.com/users/lawesson/orgs","repos_url":"https://api.github.com/users/lawesson/repos","events_url":"https://api.github.com/users/lawesson/events{/privacy}","received_events_url":"https://api.github.com/users/lawesson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/speedment/speedment/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/speedment/speedment/labels/fixed","name":"fixed","color":"0e8a16"}],"state":"closed","locked":false,"assignee":{"login":"lawesson","id":21216357,"avatar_url":"https://avatars.githubusercontent.com/u/21216357?v=3","gravatar_id":"","url":"https://api.github.com/users/lawesson","html_url":"https://github.com/lawesson","followers_url":"https://api.github.com/users/lawesson/followers","following_url":"https://api.github.com/users/lawesson/following{/other_user}","gists_url":"https://api.github.com/users/lawesson/gists{/gist_id}","starred_url":"https://api.github.com/users/lawesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lawesson/subscriptions","organizations_url":"https://api.github.com/users/lawesson/orgs","repos_url":"https://api.github.com/users/lawesson/repos","events_url":"https://api.github.com/users/lawesson/events{/privacy}","received_events_url":"https://api.github.com/users/lawesson/received_events","type":"User","site_admin":false},"assignees":[{"login":"lawesson","id":21216357,"avatar_url":"https://avatars.githubusercontent.com/u/21216357?v=3","gravatar_id":"","url":"https://api.github.com/users/lawesson","html_url":"https://github.com/lawesson","followers_url":"https://api.github.com/users/lawesson/followers","following_url":"https://api.github.com/users/lawesson/following{/other_user}","gists_url":"https://api.github.com/users/lawesson/gists{/gist_id}","starred_url":"https://api.github.com/users/lawesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lawesson/subscriptions","organizations_url":"https://api.github.com/users/lawesson/orgs","repos_url":"https://api.github.com/users/lawesson/repos","events_url":"https://api.github.com/users/lawesson/events{/privacy}","received_events_url":"https://api.github.com/users/lawesson/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/speedment/speedment/milestones/18","html_url":"https://github.com/speedment/speedment/milestones/3.0.1%20Forest","labels_url":"https://api.github.com/repos/speedment/speedment/milestones/18/labels","id":1970171,"number":18,"title":"3.0.1 Forest","description":"","creator":{"login":"Pyknic","id":5597672,"avatar_url":"https://avatars.githubusercontent.com/u/5597672?v=3","gravatar_id":"","url":"https://api.github.com/users/Pyknic","html_url":"https://github.com/Pyknic","followers_url":"https://api.github.com/users/Pyknic/followers","following_url":"https://api.github.com/users/Pyknic/following{/other_user}","gists_url":"https://api.github.com/users/Pyknic/gists{/gist_id}","starred_url":"https://api.github.com/users/Pyknic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pyknic/subscriptions","organizations_url":"https://api.github.com/users/Pyknic/orgs","repos_url":"https://api.github.com/users/Pyknic/repos","events_url":"https://api.github.com/users/Pyknic/events{/privacy}","received_events_url":"https://api.github.com/users/Pyknic/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":8,"state":"open","created_at":"2016-08-29T17:19:30Z","updated_at":"2016-10-07T16:35:28Z","due_on":"2016-09-29T00:00:00Z","closed_at":null},"comments":1,"created_at":"2016-09-13T15:52:05Z","updated_at":"2016-10-07T16:35:28Z","closed_at":"2016-10-07T16:35:28Z","body":"The following code in the socialnetwork tutorial Server causes an exception at JsonEncoderImpl.java:278 since the field (a LongForeignKeyFieldImpl) does not have a finder.\r\n\r\nin Server:\r\n\r\n```java        \r\n         jsonImageEncoder = JsonEncoder\r\n                .allOf(images)\r\n                .put(Image.UPLOADER,\r\n                        JsonEncoder.allOf(users)\r\n                                .remove(User.AVATAR)\r\n                                .remove(User.PASSWORD)\r\n                );\r\n```\r\n\r\nException thrown by the put() method:\r\n\r\nException in thread \"main\" java.lang.BootstrapMethodError: call site initialization exception\r\n\tat java.lang.invoke.CallSite.makeSite(CallSite.java:341)\r\n\tat java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:307)\r\n\tat java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:297)\r\n\tat com.speedment.plugins.json.internal.JsonEncoderImpl.put(JsonEncoderImpl.java:278)\r\n\tat com.speedment.examples.socialserver.Server.<init>(Server.java:54)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:422)\r\n\tat java.lang.Class.newInstance(Class.java:442)\r\n\tat fi.iki.elonen.ServerRunner.run(ServerRunner.java:41)\r\n\tat com.speedment.examples.socialserver.Server.main(Server.java:249)\r\nCaused by: java.lang.invoke.LambdaConversionException: Invalid receiver type interface com.speedment.runtime.field.Field; not a subtype of implementation type interface com.speedment.runtime.field.trait.HasFinder\r\n\tat java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:233)\r\n\tat java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:303)\r\n\tat java.lang.invoke.CallSite.makeSite(CallSite.java:302)\r\n\t... 11 more\r\n\r\nspeedment.json attached for reference:\r\n```json\r\n{\r\n  \"config\" : {\r\n    \"expanded\" : true,\r\n    \"companyName\" : \"company\",\r\n    \"name\" : \"socialnetwork\",\r\n    \"packageLocation\" : \"src/main/java/\",\r\n    \"dbmses\" : [\r\n      {\r\n        \"expanded\" : true,\r\n        \"port\" : 3306,\r\n        \"schemas\" : [\r\n          {\r\n            \"tables\" : [\r\n              {\r\n                \"foreignKeys\" : [\r\n                  {\r\n                    \"expanded\" : false,\r\n                    \"foreignKeyColumns\" : [\r\n                      {\r\n                        \"foreignDatabaseName\" : \"db0\",\r\n                        \"foreignSchemaName\" : \"socialnetwork\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"uploader\",\r\n                        \"foreignColumnName\" : \"id\",\r\n                        \"foreignTableName\" : \"user\",\r\n                        \"ordinalPosition\" : 1\r\n                      }\r\n                    ],\r\n                    \"name\" : \"image_uploader_to_user_id\"\r\n                  }\r\n                ],\r\n                \"expanded\" : true,\r\n                \"primaryKeyColumns\" : [\r\n                  {\r\n                    \"expanded\" : true,\r\n                    \"name\" : \"id\",\r\n                    \"ordinalPosition\" : 1\r\n                  }\r\n                ],\r\n                \"indexes\" : [\r\n                  {\r\n                    \"expanded\" : false,\r\n                    \"unique\" : true,\r\n                    \"name\" : \"PRIMARY\",\r\n                    \"indexColumns\" : [\r\n                      {\r\n                        \"orderType\" : \"ASC\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"id\",\r\n                        \"ordinalPosition\" : 1\r\n                      }\r\n                    ]\r\n                  },\r\n                  {\r\n                    \"expanded\" : false,\r\n                    \"unique\" : false,\r\n                    \"name\" : \"image_uploader_to_user_id\",\r\n                    \"indexColumns\" : [\r\n                      {\r\n                        \"orderType\" : \"ASC\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"uploader\",\r\n                        \"ordinalPosition\" : 1\r\n                      }\r\n                    ]\r\n                  }\r\n                ],\r\n                \"columns\" : [\r\n                  {\r\n                    \"databaseType\" : \"java.lang.Long\",\r\n                    \"typeMapper\" : \"com.speedment.runtime.config.mapper.primitive.PrimitiveTypeMapper\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"autoIncrement\" : true,\r\n                    \"name\" : \"id\",\r\n                    \"ordinalPosition\" : 1\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.Long\",\r\n                    \"typeMapper\" : \"com.speedment.runtime.config.mapper.primitive.PrimitiveTypeMapper\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"uploader\",\r\n                    \"ordinalPosition\" : 2\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.String\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"title\",\r\n                    \"ordinalPosition\" : 3\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.String\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"description\",\r\n                    \"ordinalPosition\" : 4\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.String\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"img_data\",\r\n                    \"ordinalPosition\" : 5\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.sql.Timestamp\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"uploaded\",\r\n                    \"ordinalPosition\" : 6\r\n                  }\r\n                ],\r\n                \"name\" : \"image\"\r\n              },\r\n              {\r\n                \"foreignKeys\" : [\r\n                  {\r\n                    \"expanded\" : false,\r\n                    \"foreignKeyColumns\" : [\r\n                      {\r\n                        \"foreignDatabaseName\" : \"db0\",\r\n                        \"foreignSchemaName\" : \"socialnetwork\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"follower\",\r\n                        \"foreignColumnName\" : \"id\",\r\n                        \"foreignTableName\" : \"user\",\r\n                        \"ordinalPosition\" : 1\r\n                      }\r\n                    ],\r\n                    \"name\" : \"follow_follower_to_user_id\"\r\n                  },\r\n                  {\r\n                    \"expanded\" : false,\r\n                    \"foreignKeyColumns\" : [\r\n                      {\r\n                        \"foreignDatabaseName\" : \"db0\",\r\n                        \"foreignSchemaName\" : \"socialnetwork\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"follows\",\r\n                        \"foreignColumnName\" : \"id\",\r\n                        \"foreignTableName\" : \"user\",\r\n                        \"ordinalPosition\" : 1\r\n                      }\r\n                    ],\r\n                    \"name\" : \"follow_follows_to_user_id\"\r\n                  }\r\n                ],\r\n                \"expanded\" : true,\r\n                \"primaryKeyColumns\" : [\r\n                  {\r\n                    \"expanded\" : true,\r\n                    \"name\" : \"follower\",\r\n                    \"ordinalPosition\" : 1\r\n                  },\r\n                  {\r\n                    \"expanded\" : true,\r\n                    \"name\" : \"follows\",\r\n                    \"ordinalPosition\" : 2\r\n                  }\r\n                ],\r\n                \"indexes\" : [\r\n                  {\r\n                    \"expanded\" : false,\r\n                    \"unique\" : true,\r\n                    \"name\" : \"PRIMARY\",\r\n                    \"indexColumns\" : [\r\n                      {\r\n                        \"orderType\" : \"ASC\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"follower\",\r\n                        \"ordinalPosition\" : 1\r\n                      },\r\n                      {\r\n                        \"orderType\" : \"ASC\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"follows\",\r\n                        \"ordinalPosition\" : 2\r\n                      }\r\n                    ]\r\n                  },\r\n                  {\r\n                    \"expanded\" : false,\r\n                    \"unique\" : false,\r\n                    \"name\" : \"follow_follows_to_user_id\",\r\n                    \"indexColumns\" : [\r\n                      {\r\n                        \"orderType\" : \"ASC\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"follows\",\r\n                        \"ordinalPosition\" : 1\r\n                      }\r\n                    ]\r\n                  }\r\n                ],\r\n                \"columns\" : [\r\n                  {\r\n                    \"databaseType\" : \"java.lang.Long\",\r\n                    \"typeMapper\" : \"com.speedment.runtime.config.mapper.primitive.PrimitiveTypeMapper\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"follower\",\r\n                    \"ordinalPosition\" : 1\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.Long\",\r\n                    \"typeMapper\" : \"com.speedment.runtime.config.mapper.primitive.PrimitiveTypeMapper\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"follows\",\r\n                    \"ordinalPosition\" : 2\r\n                  }\r\n                ],\r\n                \"name\" : \"link\"\r\n              },\r\n              {\r\n                \"expanded\" : true,\r\n                \"primaryKeyColumns\" : [\r\n                  {\r\n                    \"expanded\" : true,\r\n                    \"name\" : \"id\",\r\n                    \"ordinalPosition\" : 1\r\n                  }\r\n                ],\r\n                \"indexes\" : [\r\n                  {\r\n                    \"expanded\" : false,\r\n                    \"unique\" : true,\r\n                    \"name\" : \"PRIMARY\",\r\n                    \"indexColumns\" : [\r\n                      {\r\n                        \"orderType\" : \"ASC\",\r\n                        \"expanded\" : true,\r\n                        \"name\" : \"id\",\r\n                        \"ordinalPosition\" : 1\r\n                      }\r\n                    ]\r\n                  }\r\n                ],\r\n                \"columns\" : [\r\n                  {\r\n                    \"databaseType\" : \"java.lang.Long\",\r\n                    \"typeMapper\" : \"com.speedment.runtime.config.mapper.primitive.PrimitiveTypeMapper\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"autoIncrement\" : true,\r\n                    \"name\" : \"id\",\r\n                    \"ordinalPosition\" : 1\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.String\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"mail\",\r\n                    \"ordinalPosition\" : 2\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.String\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : false,\r\n                    \"name\" : \"password\",\r\n                    \"ordinalPosition\" : 3\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.String\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : true,\r\n                    \"name\" : \"first_name\",\r\n                    \"ordinalPosition\" : 4\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.String\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : true,\r\n                    \"name\" : \"last_name\",\r\n                    \"ordinalPosition\" : 5\r\n                  },\r\n                  {\r\n                    \"databaseType\" : \"java.lang.String\",\r\n                    \"expanded\" : true,\r\n                    \"nullable\" : true,\r\n                    \"name\" : \"avatar\",\r\n                    \"ordinalPosition\" : 6\r\n                  }\r\n                ],\r\n                \"name\" : \"user\"\r\n              }\r\n            ],\r\n            \"expanded\" : true,\r\n            \"name\" : \"socialnetwork\"\r\n          }\r\n        ],\r\n        \"typeName\" : \"MySQL\",\r\n        \"ipAddress\" : \"127.0.0.1\",\r\n        \"name\" : \"db0\",\r\n        \"username\" : \"root\"\r\n      }\r\n    ],\r\n    \"enabled\" : true\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"minborg"}}