Monday, July 9, 2018

User/Role/Permission for application using MongoDB and Jackson JSON?

Leave a Comment

I have created three classes user, role, permission. I'm creating an application which is using mongodb and Jackson JSON (wiki.fasterxml.com/JacksonHome)

Example,

 User will have Role Object  Role will have List<Permission> and List<User> Objects  Permission will have name and description field 

In mongoose, we have DBRef/ref attribute to specify parent, child relationship so that the child entities will be automatically populated on query using populate() api

Questions:

  1. Do we have annotation in fasterxml similar to DBRef/Ref in mongoose?
  2. Is there a way to retrieve all the child objects of the parent in single query?

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment