Skip to content

Conversation

@Spamercz
Copy link
Contributor

@Spamercz Spamercz commented Apr 4, 2024

No description provided.

@Spamercz Spamercz self-assigned this Apr 4, 2024
Spamercz added 22 commits June 5, 2024 17:10
- Added to version provider
- Updated diagnostics panel
- Changed to new client object from elasticsearch repo
- To track what entity is loaded and if it is changed
to be used in creating related entities
- iterates child entities and dispatches events on them
- if entity exists in identity map with that id/index combination it is returned instead of getting it from Elasticsearch
- after entity is inserted to elasticsearch, that entity is also stored in identitymap
PrepareEntityArray:
- Entities must extend AbstractElasticEntity (to utilize its requirement of id method)
- Handled entities are added to identityMap, to prevent insert loop (entity is inserted only once if it is missing in identityMap or is changed)
- Persisting is handled via entityManager instead of services (deprecated method)
- Added support for "STI" entities, ie to help entity factory figure out what class it should create when fetching from elasticsearch
- Utilizes special key entityClass in its data to store entity class
EntityFactory:
- To figure out what entity to create (and child entities) that has abstract type or is just interface, new metadata were added - EntityClass
- If property has type that is interface, then this metadata is used to figure out what entity should be created
- This enables to use "STI" mechanic, without developer involvement, it happens automatically
- Uses identityMap, if entity is allready created it skips creating and returns that version
- Uses ChangeSet to figure out what entities and specially child entities were changed.
@Spamercz Spamercz force-pushed the v2.0 branch 2 times, most recently from b274605 to 4a397d9 Compare June 9, 2024 21:54
… on load.

This is logged as critical exception but not thrown (due to entity may be deleted so you have to cleaup your data)
…f circular reference, so entity is not loaded multiple times
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants