Task #1050
closedShorttext as default
Added by Marcel Poul over 6 years ago. Updated almost 6 years ago.
100%
Description
Please make a shorttext a default type for EAV, when they are defined during sync. mapping.
I created EAV and default was TEXT, which does not work for automatic roles.
Related issues
Updated by Marcel Poul over 6 years ago
I was not able to delete the EAV already created and filled with some value so I had to create a new EAV of new type and made a reconciliation of all users.
Updated by Ondřej Kopr over 6 years ago
Marcel Poul wrote:
which does not work for automatic roles.
For TEXT (string_value, org.hibernate.type.StringClobType) doesn't work equals on database. Automatic role behavior is only result from this behavior :D don't get mad at my automatic roles.
Updated by Marcel Poul over 6 years ago
Ondřej Kopr wrote:
Marcel Poul wrote:
which does not work for automatic roles.
For TEXT (string_value, org.hibernate.type.StringClobType) doesn't work equals on database. Automatic role behavior is only result from this behavior :D don't get mad at my automatic roles.
I am not of course :-). In fact that is the reason why I suggest to make a shorttext a default EAV type. So you do not come across the same situation I mentioned I my first comment.
Updated by Marcel Poul over 6 years ago
- Related to Task #1052: delete non empty EAV (even with values) added
Updated by Vít Švanda over 6 years ago
This is a little complicated because when will be shrotext used as default, then will not worked sync of attributes with value larger than 2000 chars.
Updated by Vít Švanda over 6 years ago
Next good reason why is TEXT default presistent type in sync is performence. TEXT is not indexed, but SHORTTEXT yes (SHORTTEXT is using in searching ... automatic role..).
Updated by Marcel Poul over 6 years ago
Vít Švanda wrote:
Next good reason why is TEXT default presistent type in sync is performence. TEXT is not indexed, but SHORTTEXT yes (SHORTTEXT is using in searching ... automatic role..).
So if the shorttext is indext, it should be prefered and default then?
I see that this ticket might be a little struggle between UX and performance, but I guess that almost every administrator during synchronization use EAV and so default type TEXT. Then he will be really surprised that he cannot use automatic role. Even worse, he will have no easy and convenient way of how to swich TEXT -> SHORTTEXT. So I vote rather to have shorttext as default.
Or maybe you can think of some better solution that I cannot see now, since I do not have detailed implementation knowledge. Maybe some discussion with Zdenek or Radek can take place too.
Updated by Vít Švanda over 6 years ago
Marcel Poul wrote:
So if the shorttext is indext, it should be prefered and default then?
Indexed columns are fast for read, but slow on insert (DB have to create the index).
And you want to have fast sync :-).
But I agree, we have to solve this case (switching TEXT -> SHORTTEXT).
Updated by Vít Švanda over 6 years ago
- Target version changed from Jade (8.1.0) to Lapis (8.2.0)
Updated by Vít Švanda over 6 years ago
- Target version changed from Lapis (8.2.0) to Malachite (9.0.0)
Updated by Vít Švanda over 6 years ago
- Target version deleted (
Malachite (9.0.0))
Updated by Vít Švanda almost 6 years ago
- Status changed from New to In Progress
Updated by Vít Švanda almost 6 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 0 to 90
Shortext as default - When EAV attribute from mapped attribute was created, then (for string schema attributes) PersistentType.TEXT type was used as default. TEXT type cannot be indexed, so this type is not useful for searching. For this reason will be since version 9.4.0 as default type sets PersistentType.SHORTTEXT.
Important:- Shortext is limmeted on max 2000 characters!
- That change was realized in converters (IDM <- IC). It means this default type will be used for new EAV attributes and for system configuration too. Existing values (with old type) will be not modifed.
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/fb4b41cbde77a5f395f695225f5ebb5bb0f1bab0
Updated by Vít Švanda almost 6 years ago
- Status changed from Needs feedback to In Progress
Updated by Vít Švanda almost 6 years ago
- Assignee changed from Radek Tomiška to Vít Švanda
Updated by Vít Švanda almost 6 years ago
I canceled modifications in converters, because this changes broke VS and RPT module.
No only on creating new EAV attribute from attribute mapping use SHORTTEXT as default.
Updated by Vít Švanda almost 6 years ago
- Status changed from In Progress to Needs feedback
Updated by Vít Švanda almost 6 years ago
- Assignee changed from Vít Švanda to Radek Tomiška
Updated by Radek Tomiška almost 6 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Radek Tomiška to Vít Švanda
- % Done changed from 90 to 100
I did test and review, it works, thx!
Updated by Vít Švanda almost 6 years ago
- Status changed from Resolved to Closed