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

RevEng: Use alternate key when no primary key #19918

Open
Tracked by #22948
bricelam opened this issue Feb 13, 2020 · 5 comments
Open
Tracked by #22948

RevEng: Use alternate key when no primary key #19918

bricelam opened this issue Feb 13, 2020 · 5 comments

Comments

@bricelam
Copy link
Contributor

bricelam commented Feb 13, 2020

Mentioned in #5719 but got missed:

If there is no primary key defined, we could fallback to using a unique constraint/index if there is one.

And from #8840:

If a table in SQLite doesn't have an explicit primary key, the implicit rowid column can be used to uniquely identify a row. We should map the rowid column to a property in this case.

This would help unorthodox schemas like the ones in #18633 work better

@ice1e0
Copy link

ice1e0 commented Feb 14, 2020

This would be great; it would require that columns with nullable columns can be tracked, since unique constraints/indexes support nullable columns, primary keys don't nullable values; but maybe that requirement could be implemented with a separate issue.

@mt3sliv
Copy link

mt3sliv commented Aug 31, 2023

Any update on this?

@mt3sliv
Copy link

mt3sliv commented Aug 31, 2023

Any update on this?

I see it is on the backlog: #22948 is there any recommended work around until it is fixed? Cheers!

@DasNaughtie
Copy link

Any update on this or a workaround?

@ajcvickers
Copy link
Member

@DasNaughtie Manually add the call to HasKey.

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

No branches or pull requests

5 participants