I want to use a many-to-many relation between System & Device. I want the system to know its devices order. I've seen here that I can do it using @OrderColumn.
How can I do it using hibernate xml configuration instead of annotation?
I want to use a many-to-many relation between System & Device. I want the system to know its devices order. I've seen here that I can do it using @OrderColumn.
How can I do it using hibernate xml configuration instead of annotation?
If you're using Hibernate you could try with
sort="unsorted|natural|comparatorClass" order-by="column_name asc|desc"
as attributes of your relatonship declaration
@OrderColumn is the JPA annotation introduced in JPA 2.0. This works as an additional feature if we work hibernate through JPA. There is no equivalent replacement in hibernate who work with hibernate directly.