Unique Constraint; @Entity @Table(name = "stock_daily_record", catalog = "mkyongdb", unique Constraints = @Unique Constraint(column Names = "DATE")) public class Stock Daily Record implements
Let’s create entities with minimum information for sake of clarity. If you save an employee, then all associated accounts will also be saved into database. In order to manage the size of the post, i have skipped the textual descriptions of some basic stuff. In case you are interested in those details, this ,this & this post will help you. What is the difference between Unidirectional and Bidirectional associations?Since the table generated in the db are all the same,so the only difference I found is that each side of the bidiretional assocations will have a refer to the other,and the unidirectional not.