imagine you have a Hibernate/JPA entity class Text which may be annotated with multiple members of class Tag – how would you ensure that Text entity exist only once for a set an arbitrary combination of Tags?
Thank you for help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would make a hash of the keys of the Tags and put a unique key on that. There isn’t really any built in way to ensure a Bag’s contents are unique.