Project

General

Profile

Task #1050

Shorttext as default

Added by Marcel Poul about 1 year ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Synchronization
Target version:
Start date:
04/03/2018
Due date:
% Done:

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

Related to CzechIdM - Task #1052: delete non empty EAV (even with values) New 04/04/2018

History

#1 Updated by Marcel Poul about 1 year 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.

#2 Updated by Marcel Poul about 1 year ago

  • Description updated (diff)

#3 Updated by Ondřej Kopr about 1 year 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.

#4 Updated by Marcel Poul about 1 year 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.

#5 Updated by Marcel Poul about 1 year ago

  • Related to Task #1052: delete non empty EAV (even with values) added

#6 Updated by Vít Švanda about 1 year ago

  • Target version set to Jade (8.1.0)

#7 Updated by Vít Švanda about 1 year 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.

#8 Updated by Vít Švanda about 1 year 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..).

#9 Updated by Marcel Poul about 1 year 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.

#10 Updated by Vít Švanda about 1 year 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).

#11 Updated by Vít Švanda 11 months ago

  • Target version changed from Jade (8.1.0) to Lapis (8.2.0)

#12 Updated by Vít Švanda 10 months ago

  • Target version changed from Lapis (8.2.0) to Malachite (9.0.0)

#13 Updated by Vít Švanda 8 months ago

  • Target version deleted (Malachite (9.0.0))

#14 Updated by Vít Švanda 3 months ago

  • Target version set to Opal (9.4.0)

#15 Updated by Vít Švanda 3 months ago

  • Status changed from New to In Progress

#16 Updated by Vít Švanda 3 months 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

#17 Updated by Vít Švanda 3 months ago

  • Status changed from Needs feedback to In Progress

#18 Updated by Vít Švanda 3 months ago

  • Assignee changed from Radek Tomiška to Vít Švanda

#19 Updated by Vít Švanda 3 months 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.

#20 Updated by Vít Švanda 3 months ago

  • Status changed from In Progress to Needs feedback

#21 Updated by Vít Švanda 3 months ago

  • Assignee changed from Vít Švanda to Radek Tomiška

#22 Updated by Radek Tomiška 3 months 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!

#23 Updated by Vít Švanda 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF