Mapping relational field thegraph


I have two entities with one to may relationship.


type Main @entity{
   id: ID! #address of a contract

type Another @entity{
   id: ID!
   main: Main! #how to set this field in mapping.ts?
   amount: BigInt!

another.main = "" #do I pass in address (which is the ID of the Main entity) of the Main contract?

I am doubtful on what I should add in the relationship field (main) during mapping? do I pass in the ID of the Main entity?