{"action":"opened","issue":{"url":"https://api.github.com/repos/asdine/storm/issues/241","repository_url":"https://api.github.com/repos/asdine/storm","labels_url":"https://api.github.com/repos/asdine/storm/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/asdine/storm/issues/241/comments","events_url":"https://api.github.com/repos/asdine/storm/issues/241/events","html_url":"https://github.com/asdine/storm/issues/241","id":389470583,"node_id":"MDU6SXNzdWUzODk0NzA1ODM=","number":241,"title":"`storm:\"id\"` not working as expected","user":{"login":"jpo-joyent","id":42818489,"node_id":"MDQ6VXNlcjQyODE4NDg5","avatar_url":"https://avatars3.githubusercontent.com/u/42818489?v=4","gravatar_id":"","url":"https://api.github.com/users/jpo-joyent","html_url":"https://github.com/jpo-joyent","followers_url":"https://api.github.com/users/jpo-joyent/followers","following_url":"https://api.github.com/users/jpo-joyent/following{/other_user}","gists_url":"https://api.github.com/users/jpo-joyent/gists{/gist_id}","starred_url":"https://api.github.com/users/jpo-joyent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpo-joyent/subscriptions","organizations_url":"https://api.github.com/users/jpo-joyent/orgs","repos_url":"https://api.github.com/users/jpo-joyent/repos","events_url":"https://api.github.com/users/jpo-joyent/events{/privacy}","received_events_url":"https://api.github.com/users/jpo-joyent/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-10T20:21:13Z","updated_at":"2018-12-10T20:21:13Z","closed_at":null,"author_association":"NONE","body":"According to the docs:\r\n\r\nhttps://github.com/asdine/storm/blob/5a6fe65e3993f63951c8e3f64c812536c9e23595/README.md#L97-L111\r\n\r\nI believe the following should work\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"github.com/asdine/storm\"\r\n)\r\n\r\ntype Inlined struct {\r\n\tfoo string `storm:\"id\"`\r\n}\r\n\r\ntype Schema struct {\r\n\tchild Inlined `storm:\"inline\"`\r\n\tbar string\r\n}\r\n\r\nfunc main() {\r\n\tdb, err := storm.Open(\"./test.db\")\r\n\tif err != nil {\r\n\t\tfmt.Println(\"unable to open db:\", err)\r\n\t}\r\n\r\n\tif err := db.Init(&Schema{}); err != nil {\r\n\t\tfmt.Println(\"unable to init db:\", err)\r\n\t}\r\n}\r\n```\r\n\r\nbut instead I get:\r\n```\r\n$ go run ./test.go\r\nunable to init db: missing struct tag id or ID field\r\n```\r\n\r\nI also get the same result with:\r\n```go\r\ntype Schema struct {\r\n\tInlined `storm:\"inline\"`\r\n\tbar string\r\n}\r\n```\r\n\r\nDid I misread the docs? Is this functionality broken? Are the docs wrong?"}}
{"actor":{"display_login":"jpo-joyent"}}