Skip to content

Tag: jpa

printing TypedQuery in console

How to sysout the TypedQuery in eclipse console. Am trying with .toString() and its not working Please find my java code below. Answer You need to enable logging for the the following categories: So a log4j configuration could look like: The first is equivalent to hibernate.show_sql=true legacy property, the …

Jpa Enum error with Smallint type in postgres

I want to put enum in my entity. But I have an error with validation which JPA wonts smallint set as enum. How I can solve this issue. “Schema-validation: wrong column type encountered in column [status] in table [order]; found [int2 (Types#SMALLINT)], but expecting [int4 (Types#INTEGER)]”[enter i…

JPA strange behavior when using SELECT

I am new to Java and try developing a SWing app for library using JPA controller generated. When I try to select result from sql server database, I use this command CriteriaBuilder criteriaBuilder = …