Skip to content

Conversation

mpawliszyn
Copy link
Collaborator

I do this by always using raw SQL for queries that are expected to deal with a full view of the table.

I do this by always using raw SQL for queries that are expected to deal
with a full view of the table.
@mpawliszyn mpawliszyn force-pushed the mikepaw.null-hibernate branch from 90ee495 to 511fb35 Compare September 16, 2024 14:37
// This query uses raw sql to avoid bumping into hibernate features such as @Where and
// @SQLRestriction.
// All of [selectMaxBound], [selectMinAndMax] and [selectMinAndCount] must be raw SQL since
// they depend on each other having the same view of the table.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice docs

// they depend on each other having the same view of the table.
val pkeyName = backfill.primaryKeyName()
val params = mutableListOf<Pkey>()
var where = when {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooooh now this lines up very nicely with the docs

@swankjesse swankjesse merged commit 4b9186f into master Sep 16, 2024
5 checks passed
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.

2 participants