Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem of Table Inheritance. #65

Open
nasanjargal-b opened this issue Jan 21, 2020 · 1 comment
Open

Problem of Table Inheritance. #65

nasanjargal-b opened this issue Jan 21, 2020 · 1 comment

Comments

@nasanjargal-b
Copy link

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

@HamedMasafi
Copy link
Owner

ATM Nut is not detected table inheritance.
But thanks for reporting, It's in my TODO list now.
It will be fixed ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants