i want to know the method that modify type value in "table per subclass".
example,
Member class (Parent class)
- tablename : MEMBERS
- type value: "group" (discriminator value)
User Class (Chidren class)
- tablename : MEMBER_USER
- type value : "user" (discriminator value)
- name : "Smith"
Department Class (Childrent Class)
- tablename : MEMBER_DEPARTMENT
- type value: department (discriminator value)
- code : "dep01"
i want to changed type and class (user class -> departemnt class)
next, sample code. but it's incorrect code.
Code:
Member member= (User)session.load(Member.class, memberSeq);
member = new Department();
(Department)member.setCode("dep01");
session.update(member);
but, our database's type value never changed. how can i solve this problem?