Replies: 4 comments 1 reply
-
Can you please share your model code here, because when you query "Model.all()" it will fetch all the columns except "password". So I request you to share your code so that I can help you out. |
Beta Was this translation helpful? Give feedback.
-
import { BaseModel, column, HasOne, hasOne } from '@ioc:Adonis/Lucid/Orm'
export default class Order extends BaseModel {
public static table = 'mytable'
// public serializeExtras = true
@column({ isPrimary: true })
public orderId: number
} |
Beta Was this translation helpful? Give feedback.
-
If you don't need relationship you can use Database Query Builder instead of Model. |
Beta Was this translation helpful? Give feedback.
-
Im also facing this issue why we put the $extras column inside a meta object? I personally think this is a weird design decision |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How can I return all fields without specifying every one? Some of our vendor tables have 100+ columns :/
I can use
serializeExtras
but the problem with that it moves everything undermeta
and not theroot
which is problematic where some of the defined columns are atroot
level whilst the rest are undermeta
Is there a clean way of handling this?
Beta Was this translation helpful? Give feedback.
All reactions