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

Field Comment, table comment set by mapping support feature request #58

Open
sergeybannikov opened this issue Oct 20, 2016 · 3 comments

Comments

@sergeybannikov
Copy link

varchar("id", 10).primaryKey().comment("Identifier")
Our team very like your project, and we think that this ORM is the most laconic and simple for java (kotlin).
We use it with CodeFirst approach and would be nice to have opportunity to add db comments via mappings.
Thank you for your GREAT work!

@Tapac
Copy link
Contributor

Tapac commented Oct 20, 2016

@Aileron1410 , there is no standard sql syntax to add comments to table/column, so it may to take time to research the way it's required for each DBMS.

Also there is no generic way to retrieve comment information with jdbc metadata, so it might be hard to track comment mapping changes with what exists in database.

Is it really useful to keep comments in database with "code first" approach? Maybe just comment it in code or create comprehensible field names?

@sergeybannikov
Copy link
Author

Andrey, thank you for your reply, you're right, we can develop without it,
and if it is hard to realise, it is not necessary

20 Окт 2016 г. 23:46 пользователь "Andrey.Tarashevskiy" <
notifications@github.com> написал:

@Aileron1410 https://github.com/Aileron1410 , there is no standard sql
syntax to add comments to table/column, so it may to take time to research
the way it's required for each DBMS.

Also there is no generic way to retrieve comment information with jdbc
metadata, so it might be hard to track comment mapping changes with what
exists in database.

Is it really useful to keep comments in database with "code first"
approach? Maybe just comment it in code or create comprehensible field
names?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#58 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEQHtHq7QCTkfCXjNrldAx_2wEUrNNOxks5q19MfgaJpZM4KbzWk
.

@guai
Copy link

guai commented Mar 4, 2021

"Is it really useful to keep comments in database with "code first" approach? Maybe just comment it in code or create comprehensible field names?"
One could use them in many other places. Generate docs for example. Wrap your DB with some rest and show comments there, etc.
"there is no standard sql syntax to add comments to table/column"
DBeaver does it somehow. I believe it uses jdbc drivers, so it should be possible

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

3 participants