Automatic override of converter class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatic override of converter class

Esteban A. Maringolo
Hi,

I was having some weird issues when using a LIKE command on a fixed
size CHAR field.

It turned out to be an automatic padding of the LIKE pattern with null
character, so I was searching for something like '%foo%' and it was
being padded to '%foo%-------' (- for null char).

The thing is that this cannot be overridden because the field forces
the conversion, ignoring what you define at the mapping level.
And I think it is wrong, because you can perform a regular LIKE
operation on fixed width character fields (at least in PostgreSQL).

Has anybody experienced something like this?

Regards!

Esteban A. Maringolo

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/glorp-group/CAJMgPCKCcCQRev6kEU4X3f%3DWFbHk%2BbFnb%2BF-88BiTW2q_gCYXg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Automatic override of converter class

Esteban A. Maringolo
Nevermind... I was assigning the converter before mapping the fields,
so the mapping of the field was overriding my NullConverter definition
for that field.

Esteban A. Maringolo

On Wed, Jul 8, 2020 at 2:42 AM Esteban Maringolo <[hidden email]> wrote:

>
> Hi,
>
> I was having some weird issues when using a LIKE command on a fixed
> size CHAR field.
>
> It turned out to be an automatic padding of the LIKE pattern with null
> character, so I was searching for something like '%foo%' and it was
> being padded to '%foo%-------' (- for null char).
>
> The thing is that this cannot be overridden because the field forces
> the conversion, ignoring what you define at the mapping level.
> And I think it is wrong, because you can perform a regular LIKE
> operation on fixed width character fields (at least in PostgreSQL).
>
> Has anybody experienced something like this?
>
> Regards!
>
> Esteban A. Maringolo

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/glorp-group/CAJMgPCLiaLKxO2JBbvbN-tva8oBmgJHQFK_LwwQL8vPLcEsd4w%40mail.gmail.com.