You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have question according Find method with array response, and how it work. In the past my code returned nil instead of empty array if it does not find anything, but now it return empty array with some cap. Why this can happen, and if that behavior is result of GORM update, when this update was made (need approximate date ?
Code
varres []*Dataerr:=gormDB.Table("data").Where("1=0").Find(&res).Error// res is [] now, in the past it was nil
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! I have question according Find method with array response, and how it work. In the past my code returned nil instead of empty array if it does not find anything, but now it return empty array with some cap. Why this can happen, and if that behavior is result of GORM update, when this update was made (need approximate date ?
Code
Beta Was this translation helpful? Give feedback.
All reactions