JetBrains / JetBrains/Exposed

Allow to deactivate entity cache

Ouverte
#653 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Kotlin
Étoiles
9.3k
Forks
798
Merge moyen
4 j 2 h
PR mergées (30 j)
26

Description

I use Table to create/update/delete data in DB.
I use Entity (DAO) for some simple read.
I use Entity with a custom Query done with a Table then call `Entity.wrapRows(...).toList()`.

When using wrapRows I get cached entities which is absolutely wrong, I would like to get the actual ResultRow transformed into an Entity with the proper data.

![entity_cache_ignore_row_result](https://user-images.githubusercontent.com/3595693/66374718-356f2a00-e9de-11e9-8c2a-195418bdb1a5.png)

Due to this behavior, I can get entities with old values inside the current transaction cache but those entities have been modified in other transaction which have been committed already.
@Tapac

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start by tracing the Entity.wrapRows(...).toList() path and the entity-cache behavior described in the issue. Determine how cache deactivation should be exposed, then verify that wrapped query rows produce entities with current ResultRow values rather than cached data.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
kotlin, sql
Domaine
database
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.