Modify

Ticket #713 (closed defect: invalid)

Opened 6 years ago

Last modified 4 years ago

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:1 Changed 6 years ago by ejhernandez@…

  • Status changed from new to assigned

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

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

comment:4 Changed 6 years ago by ejhernandez@…

  • hours changed from 0 to 03
  • totalhours changed from 0.0 to 3.0

comment:5 Changed 6 years ago by juruen@…

  • Milestone changed from 0.11 to nice to have someday

comment:6 Changed 5 years ago by ejhernandez@…

  • Status changed from assigned to new

comment:7 Changed 4 years ago by juruen@…

  • Status changed from new to closed
  • Resolution set to invalid

With changes introduced in 1.1 there's no deeper recursion any longer.

Moved to wishlist wiki page

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.