Skip to content

Dynamic SQL: choose/when/otherwise only valid in a single line #4

Open
@erysavy

Description

@erysavy

When including a conditional expression to create dynamic SQL using "choose" and enclosed "when" and "otherwise" tags, a Scala MatchError is thrown if there is any whitespace between the tags.
E.g. this works ok:

<choose><when test="sometest">xx</when><otherwise>yy</otherwise></choose>

but this doesn't and throws a MatchError in line 74 of DynamicSQLBuilder.scala:

<choose>
   <when test="sometest">xx</when>
   <otherwise>yy</otherwise>
</choose>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions