Hi, everyone,
I think the correct option can include this : "the actual position of an element in a collection annotated with @OrderColumn can be found by accessing a property of the element".
Like the explanation says " OrderColumn is used to preserved order of elements in which they were added in a collection".
For example, the first element in that collection corresponds to 1 in the order column in the table, the second element corresponds to 2 in the order column and etc.
I may interpret this statement incorrectly.
Any comments?
About Question enthuware.oce-jpad.v6.2.428 :
Moderator: admin
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
-
- Site Admin
- Posts: 10068
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.428 :
Did you read the explanation provided with this option?
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.428 :
I guess I misunderstand the option. If we use a list iterator to iterate each element in the list (the collection annotated with @OrderColumn) , we can find the actual position of the elements, which is consistent with the order in OrderColumn.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.428 :
In the last explanation about @OrderColumn, it says "if the name is not specified , the column name is....
In the example given above, the name would be LINEITEM_ORDER".
I think this example, the default order column name is LINEITEMS_ORDER.
Because the rule says "the name of the referencing relationship property or fields of the referencing entity or embeddable class...."
And the name of the referencing relationship property of field is lineItems, not lineItem.
In the example given above, the name would be LINEITEM_ORDER".
I think this example, the default order column name is LINEITEMS_ORDER.
Because the rule says "the name of the referencing relationship property or fields of the referencing entity or embeddable class...."
And the name of the referencing relationship property of field is lineItems, not lineItem.
-
- Posts: 125
- Joined: Thu Jul 05, 2018 6:44 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.428 :
Yes this is true. I also spotted that and tested it and can confirm that fieldname_ORDER is the default name of the column, so in this case it is lineItems_ORDER (at least, on MySQL, the case is preserved by default).himaiMinh wrote: ↑Fri Aug 11, 2017 9:36 amIn the last explanation about @OrderColumn, it says "if the name is not specified , the column name is....
In the example given above, the name would be LINEITEM_ORDER".
I think this example, the default order column name is LINEITEMS_ORDER.
Because the rule says "the name of the referencing relationship property or fields of the referencing entity or embeddable class...."
And the name of the referencing relationship property of field is lineItems, not lineItem.
-
- Site Admin
- Posts: 10068
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.428 :
Fixed.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 81 guests