java - Hibernate Inheritance: Load all entities but no subclasses -


given 2 classes

@entity @table(name = "a") @inheritance(strategy = inheritancetype.table_per_class) public class a{ ... } 

and

@entity @table(name = "b") public class b extends a{ ... } 

when calling

sessionfactory sessionfactory = ...; session session = sessionfactory.opensession(); session.createcriteria(a.class).list() 

i receive instances of and b.

how query instances of (no subclasses of a)?


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -