Skip to content

Commit

Permalink
fix: append clause condition to derive entity serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
sjnqkqh committed Jun 25, 2024
1 parent ca20cbf commit 30b3260
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class JpqlDerivedEntitySerializer : JpqlSerializer<JpqlDerivedEntity<*>> {

if (
(statement.isSelect() && clause.isFrom()) ||
(statement.isSelect() && clause.isJoin()) ||
(statement.isUpdate() && clause.isUpdate()) ||
(statement.isDelete() && clause.isDeleteFrom())
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class JpqlDerivedEntitySerializerTest : WithAssertions {
@StatementClauseSource(
includes = [
StatementClause(JpqlRenderStatement.Select::class, JpqlRenderClause.From::class),
StatementClause(JpqlRenderStatement.Select::class, JpqlRenderClause.Join::class),
StatementClause(JpqlRenderStatement.Update::class, JpqlRenderClause.Update::class),
StatementClause(JpqlRenderStatement.Delete::class, JpqlRenderClause.DeleteFrom::class),
],
Expand Down Expand Up @@ -84,6 +85,7 @@ class JpqlDerivedEntitySerializerTest : WithAssertions {
@StatementClauseSource(
excludes = [
StatementClause(JpqlRenderStatement.Select::class, JpqlRenderClause.From::class),
StatementClause(JpqlRenderStatement.Select::class, JpqlRenderClause.Join::class),
StatementClause(JpqlRenderStatement.Update::class, JpqlRenderClause.Update::class),
StatementClause(JpqlRenderStatement.Delete::class, JpqlRenderClause.DeleteFrom::class),
],
Expand Down

0 comments on commit 30b3260

Please sign in to comment.