0

I have a entity class that having Object type as variable how to write mapping for the same.

@Entity
@Table(name="demo") 
 public class Transaction implements Serializable {

        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        @Column(name = "tid")
        private long tid;   

        Object gentemplate ;

        Object coretemplate;

        //getter and setter;
 }  
4
  • Please add more details to your question, its not clear eg: towhich table you want to add mapping Commented Dec 1, 2017 at 6:30
  • in demo table only Commented Dec 1, 2017 at 6:32
  • 1
    Possible duplicate of How do I persist a Java property of type Object using Hibernate? Commented Dec 1, 2017 at 6:34
  • But i didn't find any exact solution there Commented Dec 1, 2017 at 6:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.