Skip to content
Discussion options

You must be logged in to vote

There is no concept of sub types in Lucid. Infact, I have not seen them in majority of streamline ORMs. What you are after is relationships.

  • Yes, there will be 3 models
  • Residential Client → hasOne → Client
  • Stalal Client → hasOne → Client

With relationships in place, The ORM output object will be as follows:

{
  clientId: '',
  entityId: '',
  client: {
     type: '',
     contract
  }
}

You are looking to fetch a merged flat list of attributes. The ORM is all about relationships and trees.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@nelsonjd
Comment options

Answer selected by RomainLanz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants