Skip to content

Problem with Model table name #1601

Answered by thetutlage
mastermunj asked this question in Help
Discussion options

You must be logged in to vote

Yeah, the inhertance story with models is not that great. Something we will fix in the next release. For now you will have to explicitly define the table name on the models.

import { column } from '@ioc:Adonis/Lucid/Orm';
import BaseIdModel from './BaseIdModel';

export default class Offer extends BaseIdModel {
   public static table = 'offers'
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mastermunj
Comment options

@thetutlage
Comment options

Answer selected by mastermunj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants