Project

General

Profile

Actions

Task #1267

closed

Support save EAV with Entity

Added by Ondřej Kopr over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Eav
Target version:
Start date:
09/24/2018
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Please add new attribute "_eav"? for abstract dto. The attribute will be stored eav values. This eav values will be saved after entity save. This behavior is needed by generator.


Related issues

Related to IdStory Identity Manager - Task #1259: Generate values during create entityClosedOndřej Kopr09/18/2018

Actions
Related to IdStory Identity Manager - Defect #2424: Synchronization creates a new identity with the default value in EAV instead of the mapped valueClosedVít Švanda08/04/2020

Actions
Related to IdStory Identity Manager - Defect #2567: Automatic role by EAV is not assigned when setting the EAV together with entity (e.g. through form projection)ClosedRadek Tomiška11/09/2020

Actions
Actions #1

Updated by Ondřej Kopr over 5 years ago

  • Related to Task #1259: Generate values during create entity added
Actions #2

Updated by Radek Tomiška over 5 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Radek Tomiška over 5 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • % Done changed from 0 to 90

It's possible to save extended attributes together with entity, which owns them in one request. Configured authorization policies are checked for given eav values.
Events was added for saving extended attributes (~ form instances UPDATE) - it's possible to listen, when some extended attributes is changed (by form instance ~ definition).

Doc:
https://wiki.czechidm.com/devel/documentation/architecture/dev/events#event_types
https://wiki.czechidm.com/devel/documentation/architecture/dev/events#formablesaveprocessor

Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/66c05424ba3716e81edfdfe9d20d45dc3427f2bf

Could you do a review please? I'll create some tutorial, how to use it on FE after review, here is the snippet for PATCH identity:

{
   "id": "5436926f-69fd-4e67-981a-a4c2d952f457",
   "_eav": [
       {
           "formDefinition": {
               "code": "myform" 
           },
           "values": [
               {
                   "formAttribute": "2890dc09-d2ba-4c13-ac0c-d4308f1d7d19",
                   "stringValue": "phoneOness" 
               }
           ]
       }
   ]
}

Note: I'll try to simplify "formAttribute" in future - code can be given instead (the same as for "formDefinition" - default is used, if no definition is given).

Actions #4

Updated by Ondřej Kopr over 5 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 90 to 100

Nice, I use this feature in generated values and works as I except. When I created identity by REST is checked permissions - this right behavior. When I setup generator for adding default values, is not checked permissions. I will add information about this into documentation for generated values.

Now is possible create identity with eavs. Thank you for implement this feature.

Actions #5

Updated by Radek Tomiška over 5 years ago

  • Status changed from Resolved to Closed
Actions #6

Updated by Radek Tomiška over 3 years ago

  • Related to Defect #2424: Synchronization creates a new identity with the default value in EAV instead of the mapped value added
Actions #7

Updated by Radek Tomiška over 3 years ago

  • Related to Defect #2567: Automatic role by EAV is not assigned when setting the EAV together with entity (e.g. through form projection) added
Actions

Also available in: Atom PDF