Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {:users
- [[:user/by-id 1] [:user/by-id 3] [:user/by-id 4] [:user/by-id 6]],
- :roles [[:role/by-id 1]],
- :user/by-id
- {1
- {:id 1,
- :email "foo@example.com",
- :role 1},
- 3
- {:id 3,
- :email "bar@floyhamilton.nl",
- :role 1},
- 4
- {:id 4,
- :email "baz@example.com",
- :role 1},
- 6
- {:id 6,
- :email "nom@example.com",
- :role 1}},
- :role/by-id {1 {:id 1, :name "admin"}}}
- (defui Role
- static om/Ident
- (ident [this {:keys [id]}]
- [:role/by-id id])
- static om/IQuery
- (query [this]
- [:id :name]))
- (defui User
- static om/Ident
- (ident [this {:keys [id]}]
- [:user/by-id id])
- static om/IQuery
- (query [this]
- '[:id :email :role [:role/by-id ~role]]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement