Ticket #713 (closed defect: invalid)
Unique in hasOne relationship
| Reported by: | ejhernandez@… | Owned by: | ejhernandez@… |
|---|---|---|---|
| Milestone: | nice to have someday | Component: | base |
| Severity: | normal | Keywords: | MVC hasOne select |
| Cc: |
Description
Currently, EBox::Types::Select can behave as a HasOne? relationship importing the value for this attribute and its options from a foreign field in a foreign model.
However, its behaviour is not valid when the unique attribute is set to the field description at HasOne? relationship.
This ticket is intended to fix this bug to return only available options at inserting an element. As well as editing the HasOne? attribute the options will be the ones not inserted and the option to edit.
Attachments
Change History
comment:2 Changed 6 years ago by ejhernandez@…
(In [7905]) * Added Unique select to test model
- First attempt to put unique options at select type, delayed because of deep recursion
refs #713
- Fixed bug in DataTable?
comment:3 Changed 6 years ago by ejhernandez@…
(In [7906]) EVIL HACK!!!!
This is done here, since it makes a deep recursion error on Select type class at options method. This is due to rows implementation which always ask for printableValues and it is not possible to ask for value rows. This does not work when the edit/add will be generated by JavaScript?.
We are very ashamed about this evil hack, we want to apologise for that. Time constraints make us do this crap. Sorry.
refs #713