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

Define a 'multi-columns primary key' (composite key) not work #72

Open
choujayyl opened this issue Aug 11, 2022 · 1 comment
Open

Define a 'multi-columns primary key' (composite key) not work #72

choujayyl opened this issue Aug 11, 2022 · 1 comment

Comments

@choujayyl
Copy link

Run the qxBlogCompositeKey example,produce a qxBlogCompositeKey.sqlite db file.
I check it with DB Browser for SQLite,the table not have any primary key.
image

Test with QxOrm version 1.4.8.
And the fixed issue SQL DISTINCT keyword in qx::QxSqlQuery (qx::dao::execte_query) class (when DISTINCT is used, then the primary key is not fetched) still reproduced.

@QxOrm
Copy link
Owner

QxOrm commented Aug 22, 2022

Hello,

About qxBlogCompositeKey.sqlite file and primary keys :
As explained in the documentation here : https://www.qxorm.com/qxorm_en/manual.html#manual_470
The function qx::dao::create_table can be used to create examples or prototypes.
To manage correctly your database schema, you have to use a tool dedicated to your SGBD (pgAdmin for PostgreSQL for example) or QxEntityEditor application.
The qxBlogCompositeKey test project is valid (even without primary keys defined in the schema) : the values in each column are correct.

About SQL DISTINCT : sorry I don't understand.
Could you please provide more details ?

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