java - TABLE_PER_CLASS Inheritance not working with secondary tables -


i have class b extends class table_per_class inheritance structure. in addition that, class using secondary table.

however, when final sql being generated, secondary table being ignored. when remove inheritance, secondary table works properly. there anyway make them work together?

the issue find online similar mine bug report submitted on hibernate website 7 years ago (https://hibernate.atlassian.net/browse/hhh-4832), though seems never fixed.

is situation bug, or there step needed take place make work?

edit: code examples

class a:

@entity @inheritance(strategy = inheritancetype.table_per_class) @table(name = "classa") @secondarytable(name = "classaview", pkjoincolumns = @primarykeyjoincolumn(name = "id")) public class classa {... 

class b:

@entity @table(name = "classb") public class classb extends classa {... 

result:

[sql of inheritance here, sql secondary table doesn't exist] 


Comments

Popular posts from this blog

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

angular - DownloadURL return null in below code -