{"action":"opened","issue":{"url":"https://api.github.com/repos/dsaronin/milia/issues/63","labels_url":"https://api.github.com/repos/dsaronin/milia/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/dsaronin/milia/issues/63/comments","events_url":"https://api.github.com/repos/dsaronin/milia/issues/63/events","html_url":"https://github.com/dsaronin/milia/issues/63","id":110308374,"number":63,"title":"Member data for superuser","user":{"login":"jekuno","id":10961144,"avatar_url":"https://avatars.githubusercontent.com/u/10961144?v=3","gravatar_id":"","url":"https://api.github.com/users/jekuno","html_url":"https://github.com/jekuno","followers_url":"https://api.github.com/users/jekuno/followers","following_url":"https://api.github.com/users/jekuno/following{/other_user}","gists_url":"https://api.github.com/users/jekuno/gists{/gist_id}","starred_url":"https://api.github.com/users/jekuno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jekuno/subscriptions","organizations_url":"https://api.github.com/users/jekuno/orgs","repos_url":"https://api.github.com/users/jekuno/repos","events_url":"https://api.github.com/users/jekuno/events{/privacy}","received_events_url":"https://api.github.com/users/jekuno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-07T20:21:53Z","updated_at":"2015-10-07T20:21:53Z","closed_at":null,"body":"I have a superuser which belongs to several tenants. Data such as `first_name` and `last_name` are kept in a  separate `members` table as recommended. I understand your explanations in https://github.com/dsaronin/milia#inviting-additional-usermembers as follows:\r\n\r\n* I need **one** `user` record for this superuser\r\n* I need entries in `tenants_users` to define the membership of this user to the according tenants\r\n* **And**: I need one `member` record for this user for **each** tenant this user can access (this is because the `members` table is tenanted; only the `users` table isn't tenanted)\r\n\r\nHowever:\r\n1. your docs say there needs to be a `has_one :member` relation on the `user` (and not a `has_many`).\r\n2. It doesn't feel clean to replicate the members data (such as `first_name` and `last_name`) `n` times if the user belongs to `n` companies.\r\n\r\nWhat is the recommended way to do it with milia?"}}