java - JPA abstract generics UNION error in PostgreSQL while querying -


i have abstract class:

@entity @inheritance(strategy = inheritancetype.table_per_class) public abstract class fieldvalue<t> {      @id @generatedvalue(strategy = generationtype.table)     @getter @setter     private int id;      @transient     @getter @setter     private t value; } 

and following extensions of class:

@entity @inheritance(strategy = inheritancetype.table_per_class) public class datefieldvalue extends fieldvalue<date> {      @access(accesstype.property)     @override     public date getvalue() {         return super.getvalue();     } } 

and:

@entity @inheritance(strategy = inheritancetype.table_per_class) public class integerfieldvalue extends fieldvalue<integer> {      @access(accesstype.property)     @override     public integer getvalue() {         return super.getvalue();     }  } 

the creation of whole database schema runs correctly, there table created each extension class of abstract class. can save , update entities. however, when querying list of fieldvalue objects:

list<fieldvalue> values = fieldvaluerepository.findall(); 

the following error occurs:

caused by: org.postgresql.util.psqlexception: union types date , character varying cannot matched 

any ideas how reseolve issue?
i'm using jparepository spring data jpa crud operations.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -