gert-wijns / TypeSafeQueryBuilder

Compile time assistence while creating queries, making them more type safe and easier to refactor
6 stars 8 forks source link

case when eq a String give an error #92

Closed borisvereertbrugghen closed 6 years ago

borisvereertbrugghen commented 6 years ago

if (value instanceof TypeSafeValue<?>) { throw new IllegalArgumentException(String.format("The value [%s] is already a type safe value.", value)); } @SuppressWarnings("unchecked") TypeSafeValue selectedValue = (TypeSafeValue) getRootQuery().dequeueSelectedValue(); if (selectedValue != null) { return selectedValue; } List invocations = dequeueInvocations();

The dequeue of the invocation should happen also when selectedValue is actually a real value

TSQB 3.0.0

gert-wijns commented 6 years ago

The problem was actually that CaseTypeSafeValue was doing its own thing with invocation handling. Modified it to use the same logic as in the query instead here.