ebean icon indicating copy to clipboard operation
ebean copied to clipboard

Ebean should support also IN for local encrypted properties.

Open rPraml opened this issue 2 years ago • 3 comments

While the current documentation is very clear, that EQ (and only EQ) is supported for encrypted properties, I noticed, that IN is currently not supported (which is semantically only a concatenation of multiple EQ queries) So the documentation is right here ;)

I ponder if all exact match queries ("eq","ne","in","notIn") should work for encrypted properties? I see no technical reason, why they should not.

What do you think?

Expected behavior

found = Ebean.find(EBasicEncryptClient.class)
      .where()
      .in("description", "goodbye")
      .in("status", EBasicEncryptClient.Status.TWO)
      .in("dob", today) // <-- throws a Data Conversion error
      .findOne();

should work

rPraml avatar Aug 05 '22 13:08 rPraml

The implementation detail for this to do database side (using database functions) probably isn't conducive to IN.

Have you looked at how this could be done with IN (especially on non-Postgres dbs that don't have array binding)? Everything is doable but my impression is that this would probably be messy implementation wise.

Do you need this functionality?

rbygrave avatar Aug 08 '22 20:08 rbygrave

Oh, are you saying ONLY for client side encryption support this case?

rbygrave avatar Aug 08 '22 20:08 rbygrave

Yes, I meant client side encrypted properties.

I can check, if it will also work with server side encryption.

rPraml avatar Aug 09 '22 13:08 rPraml

closed. See #2872

rPraml avatar Nov 02 '22 12:11 rPraml