Skip to content

Problem of Table Inheritance. #65

@nasanjargal-b

Description

@nasanjargal-b

If the table is inherited and find by the field of the parent, it doesn't work.

class Person : public Nut::Table {
Q_OBJECT
NUT_PRIMARY_AUTO_INCREMENT(id)
NUT_DECLARE_FIELD(int, id, getId, setId)
}

class Student : public Person {
Q_OBJECT
NUT_DECLARE_FIELD(QString, name, getName, setName)
}

db.student()->query()->where(Student::idField()==1)->first();

Error Message: Error executing sql command: no such column: Person.id

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions