reset password
Author Message
afetiso
Posts: 84
Posted 17:56 Mar 07, 2015 |

My plan have list of stages, when I edit stage and save it, I don't know why but this stage becomes last in plan list of stages.

I tried to create and set new list of stages to the plan and save plan after, but it doesn't work.

Any suggestions?

cysun
Posts: 2935
Posted 19:48 Mar 07, 2015 |

You need to use an order column to keep the order of the columns.

afetiso
Posts: 84
Posted 14:56 Mar 08, 2015 |
cysun wrote:

You need to use an order column to keep the order of the columns.

Thank you, but can you tell me order column is it html, jquery or in controller property, or where i can read about it?

cysun
Posts: 2935
Posted 15:02 Mar 08, 2015 |
afetiso wrote:
cysun wrote:

You need to use an order column to keep the order of the columns.

Thank you, but can you tell me order column is it html, jquery or in controller property, or where i can read about it?

We talked about that when we discussed mapping ordered collections like List. Relational model does not guarantee order, which means if you want to keep order you either need to use an additional column in the table or use "order by" in the query. In terms of mapping that's either @OrderColumn or @OrderBy.