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

Docs: Extend entities definition docs and reference code from snippets #2264

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vnikolova
Copy link
Collaborator

Description

Extend documentation for "Defining entity instances" and replace code examples with references from snippets.

Defining entity instances documentation

Extended the documentation for defining entities instances in the DAO's 'Table Types' topic.

  • Added cross-references to the 'CRUD operations' topic.
  • Elaborated on keywords.
  • Moved the section to the bottom of the topic.

Referencing code from snippets

Extended the exposed-dao project sample to include the following:

  • atables directory, including table definitions referenced in the DAO's 'Table Types' and 'CRUD operations' topics.
  • an entities directory, including entities definitions also referenced in the DAO's 'Table Types' and 'CRUD operations' topics.
  • Separate functions in App.kt for CRUD operations, as referenced in the DAO 'CRUD operations' topic.
  • README.md files with instructions how to run individual projects and how to reference code from snippets.

Notes

  1. In the process of replacing the code blocks, I found that the findById query in this example was not working, so I removed it. Please let me know if this was a mistake.
val directorId = CompositeID {
    it[Directors.name] = "George Lucas"
    it[Directors.guildId] = "..."
}

val director = Director.findById(directorId) // not working, removed from example
val directors = Director.find { Directors.id eq directorId } // this is fine
  1. Not sure if we should also rename the 'Table types' topic to 'Table types and Entity definition' or something like that. Or perhaps move the entities definition to 'CRUD operations'. What do you think makes more sense?

Type of Change

Please mark the relevant options with an "X":

  • Documentation update

Checklist

  • Unit tests are in place
  • The build is green (including the Detekt check)

Related Issues

EXPOSED-535 Improve documentation for Table types and definition

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

Successfully merging this pull request may close these issues.

1 participant