{"action":"created","issue":{"url":"https://api.github.com/repos/senecajs/seneca-entity/issues/25","repository_url":"https://api.github.com/repos/senecajs/seneca-entity","labels_url":"https://api.github.com/repos/senecajs/seneca-entity/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/senecajs/seneca-entity/issues/25/comments","events_url":"https://api.github.com/repos/senecajs/seneca-entity/issues/25/events","html_url":"https://github.com/senecajs/seneca-entity/pull/25","id":167925710,"number":25,"title":"Move opts extend to preload","user":{"login":"nfantone","id":476069,"avatar_url":"https://avatars.githubusercontent.com/u/476069?v=3","gravatar_id":"","url":"https://api.github.com/users/nfantone","html_url":"https://github.com/nfantone","followers_url":"https://api.github.com/users/nfantone/followers","following_url":"https://api.github.com/users/nfantone/following{/other_user}","gists_url":"https://api.github.com/users/nfantone/gists{/gist_id}","starred_url":"https://api.github.com/users/nfantone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfantone/subscriptions","organizations_url":"https://api.github.com/users/nfantone/orgs","repos_url":"https://api.github.com/users/nfantone/repos","events_url":"https://api.github.com/users/nfantone/events{/privacy}","received_events_url":"https://api.github.com/users/nfantone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-27T18:39:55Z","updated_at":"2016-07-27T18:42:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/senecajs/seneca-entity/pulls/25","html_url":"https://github.com/senecajs/seneca-entity/pull/25","diff_url":"https://github.com/senecajs/seneca-entity/pull/25.diff","patch_url":"https://github.com/senecajs/seneca-entity/pull/25.patch"},"body":"As mentioned in #24, this fixes options overriding and allows users to disable `mem_store`.\r\n\r\n`preload` function gets invoked **before** the default export, thus ignoring `options` received in `function entity`. \r\n\r\nAlso, could I vote in favor of **disabling** `mem_store` by default? I don't know how many people actively use the plugin, but I can't tell you _how many times_ this has been a cause of bug-searching and head-scratching for hours. Your whole microservice doesn't work as expected, but _looks like it does_. Until you remember. Your transport layer isn't picking your AMQP config up: it's using the unfathomable `MemStore`! All due to a somewhat hidden property you didn't even remember existed (`mem_store: false`). So you say to yourself: \"Crap. This again. Next time, I'll remember about it\". And maybe you do, but then the next dev comes along and it's crying wolf all over again.\r\n\r\nIf this sound a bit like a rant, it's because it probably is. I had to write [a very silly wrapper around Seneca](https://github.com/nfantone/seneca-amqp) whose _main purpose_ is to configure an AMQP transport and **disable mem-store**, just to get around this behaviour. And I thought I was covered with that... until I upgraded `seneca-entity` to latest, which re-enabled `MemStore`.\r\n\r\nI get the idea behind including the store by default. It's nice when things work out of the box. But it's _nicer_ when you set things up to use a transport and your whole plugin ecosystem uses **that transport**. This is one of those things that \"reads nice\" when you are taking a look at an online doc, but it practice, it doesn't really work. You should't rely on some magical store (bar demoware) - but if you _do_ want to rely on it, you could always turn it on."},"comment":{"url":"https://api.github.com/repos/senecajs/seneca-entity/issues/comments/235680396","html_url":"https://github.com/senecajs/seneca-entity/pull/25#issuecomment-235680396","issue_url":"https://api.github.com/repos/senecajs/seneca-entity/issues/25","id":235680396,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T18:42:11Z","updated_at":"2016-07-27T18:42:11Z","body":"\n[![Coverage Status](https://coveralls.io/builds/7189957/badge)](https://coveralls.io/builds/7189957)\n\nCoverage decreased (-0.06%) to 80.057% when pulling **e076da05f7a4cf74bfac97587753018bc2b614d2 on nfantone:bug/disable-memstore** into **ab05758ed9f113f266889dbcf1bdf0f9c88f2f21 on senecajs:master**.\n"}}
{"actor":{"display_login":"coveralls"}}