Document Design - refrance/sub documents

Hello All,

I am new to Couchbase. I was read and see videos on web related to

How to design documents
I am confused regarding how I should design my documents for my project. Please help me here and suggest me the best way.
Requirement : Must be fast to update and read.
Here i give small intro of my documents and types.

Type : User
lastLogin: <Should be reference of login history document>
lastPost: <Should be reference of post document>
likes: [
{<Should be reference of user document>, is_friend:true},
{<Should be reference of user document>,is_firend:false}

Type : Post
text:“Hello, This is my first post”,
likes_clicked_by: [
<Should be reference of user document>,
<Should be reference of user document>,

  • I check couchbase odm like ottoman, lounge, etc, They are store {_type:“user”, $ref:“user|767c809b-32af-4010-a56e-a6c075737276”} for populate user when read post info.
  • is it good way?, if yes then how can i write where condition on ref document while populate.
  • is there any other way to save all data at one document? but i also should update in all document reference when i change any info of user document

sorry for long question and poor English.