[v5] Problem with an extra column on a Model #1852
-
Hi :) I've a problem with the creation of an extra property on my model. @column()
public get total_net_of_taxes(): number {
return this.total - this.charges
} But when I call my query as below, the column doesn't shows up. Account
.query()
.whereRaw(`YEAR(created_at) = ${year}`) Why ? I tried with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Did you create new migration file for the new column? or have you modified the migration related to the model? |
Beta Was this translation helpful? Give feedback.
-
Your mistyped this
try this
and also my one more suggestion, try to use the camel case function name |
Beta Was this translation helpful? Give feedback.
Your mistyped this
try this
and also my one more suggestion, try to use the camel case function name
like totalNetOfTaxes