Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity
- @DiscriminatorValue("YesNo")
- public class Child extends Parent{ // parent entity has inheritance strategy
- .....
- DiscriminatorValue type; //want to access this variable in spring form
- @Transient
- public String getDiscriminatorValue(){
- type= this.getClass().getAnnotation( DiscriminatorValue.class );
- return type == null ? null : val.value();
- }
- }
- //somewhere in jsp i have,
- ${child.type}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement