I think it's better to use the delta and maybe the id of the poll (to be able to have more than one poll in the same page) as the value of the choices in the forms.
But we should discuse how to do it, because maybe has also more sense to get the delta in the getOptions() in the poll, but Berdir told me that it can cause some problems in the Database, so we should discus this before starting to work.
The temporary solution is this getChoiceId() in WebTestBase() added in the following issue: https://www.drupal.org/node/2545296

Comments

edurenye created an issue. See original summary.

Berdir’s picture

Priority: Normal » Critical

Making this critical to decide about this, the current storage is incompatible with pgsql/sqlite and is a problem when used with translations.

Berdir’s picture

Status: Active » Closed (duplicate)

Closing this as duplicate of #2641828: Convert choices to a separate entity type, that's really the only way forward that we see to support non-mysql backends, translations and os on.