#1 2021-10-22 11:29:48

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 226
Website

TOrmPropInfoList.IndexByName is broken

Hi Arnaud,

with one of your latest commits, the method TOrmPropInfoList.IndexByName is broken, not correctly retrieving the field index.

Sample, which worked perfectly fine three days ago.
I believe the commit "refined TOrmPropInfoList property search" from two days ago broke it.

Sample showing problem: https://pastebin.com/i38U0Y0a
First line showing field at index 0 (named Login)
Second line showing index of field "Login" showing -1, expected 0

Regards,
Daniel

Offline

#2 2021-10-22 11:52:49

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 226
Website

Re: TOrmPropInfoList.IndexByName is broken

Hi,

i have simplified the sample, down to three fields:  https://pastebin.com/PZdaCyYC

First line showing field at index 0 (named A)
Second line showing index of field "A" showing -1, expected 0

Regards,
Daniel

P.S.: I believe the problem here results from field "A" having the same start as "AB" and when it first checks for "AB" being in the middle of the ordered list, it does not check for other fields. If I rename the fields for A, B, C, everything works just fine.

Last edited by sakura (2021-10-22 11:55:26)

Offline

#3 2021-10-22 17:15:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,232
Website

Re: TOrmPropInfoList.IndexByName is broken

Offline

#4 2021-10-23 09:16:46

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 226
Website

Re: TOrmPropInfoList.IndexByName is broken

Works fine!

Thank you,
Daniel

Offline

Board footer

Powered by FluxBB