Re: Object freeze and data reading

2017-01-16 Thread David Espada
2017-01-16 21:40 GMT+01:00 Jeremy Evans > Thanks. This does appear to be a bug, caused because the associations > hash was frozen before validation (freeze validates), when it probably > shouldn't be frozen until after. > .../... > You could work around this issue by overriding Company#freeze t

Re: Object freeze and data reading

2017-01-16 Thread Jeremy Evans
On Monday, January 16, 2017 at 2:10:31 AM UTC-8, David Espada wrote: > > 2017-01-13 16:22 GMT+01:00 Jeremy Evans: > >> Are you running the current version of Sequel? I remember fixing an >> issue like this sometime in the past. The line number you give doesn't >> really make sense to cause the

Re: Object freeze and data reading

2017-01-16 Thread David Espada
2017-01-13 16:22 GMT+01:00 Jeremy Evans : > Are you running the current version of Sequel? I remember fixing an issue > like this sometime in the past. The line number you give doesn't really > make sense to cause the issue in the current code. If you are running the > current version, please p

Re: Object freeze and data reading

2017-01-13 Thread Jeremy Evans
On Friday, January 13, 2017 at 2:20:46 AM UTC-8, David Espada wrote: > > Hi all. > > I have a little problem reading data objects inside a frozen object. If I > have a one_to_many relationship between Foo and Bar models, this code fails > without a good reason (IMHO): > > foo.freeze > foo.bar

Object freeze and data reading

2017-01-13 Thread David Espada
Hi all. I have a little problem reading data objects inside a frozen object. If I have a one_to_many relationship between Foo and Bar models, this code fails without a good reason (IMHO): foo.freeze foo.bars Problem is in line lib/sequel/model/associations.rb:1791 of Sequel code. Any clue f