Encerrado

TEXT column: Argument data type text is invalid for argument 1 of lower function

I currently have a repo method which is acting as a filter with pagination:

Repo:

@Query("SELECT e FROM DeTest e " +

"WHERE [login to view URL] = '9999-12-31 00:00:00.000' " +

"AND (:name is null OR LOWER ([login to view URL]) LIKE LOWER ('%' + :name+ '%')) " +

"AND (:description is null OR LOWER ([login to view URL]) LIKE LOWER ('%' + :description + '%')) " +

"AND (:theProblem is null OR LOWER ([login to view URL] ) LIKE LOWER ('%' + :theProblem + '%')) "

)

So as shown here, I have it so when you enter a value it will change it ensuring that both uppercase values and lowercase values are displayed. However, when adding LOWER to the 'theProblem' column, it produces the error in the title:

Argument data type text is invalid for argument 1 of lower function

My datatype for that particular column is text, and therefore, I think the culprit of the issue. However, due to the db layout I need it to be a text. Therefore, is there anyway I could convert/cast it in the repo method for when it's called?

Column:

@Column(name = "the_problem", columnDefinition = "TEXT") // text rather than varchar

private String theProblem;

Thank you.

Habilidades: Java, Desenvolvimento de Software, Programming, Coding

Veja mais: websites type text displayed, transaction refused invalid argument oscommerce, line error invalid argument, argument data type text is invalid for argument 1 of replace function sql 2008, argument data type varbinary(max) is invalid for argument 1 of textptr function, argument data type text is invalid for argument 2 of hashbytes function, argument data type xml is invalid for argument 1 of like function, replace function in sql server text field, argument data type xml is invalid for argument 1 of stuff function, argument data type sql_variant is invalid for argument 1 of like function, argument data type varchar is invalid for argument 1 of format function, warning invalid argument supplied foreach adminedit_orders, net documentviewer type text find, invalid argument supplied foreach pathwayphp line error, type text external file flash, invalid argument supplied foreach edit_ordersphp oscommerce, oscommerce invalid argument foreach edit_ordersphp, invalid argument supplied foreach edit_ordersphp, invalid argument supplied foreach joomla help, invalid argument supplied foreach oscommerce ordersphp

Acerca do Empregador:
( 1 comentário ) Belfast, United Kingdom

ID do Projeto: #27546201

2 freelancers are bidding on average £15 for this job

(675 Comentários)
6.9
theatasolution1

Hello, I'm an expert Java developer with experience in object-oriented, data structure, swing, JavaFX and more advanced. I can help you to finish this project with great quality. We can negotiate on price/Budget Regard Mais

£15 GBP em 1 dia
(5 Comentários)
2.4