Hi.
I need to define a synthtic field for a Sequel::Model source dataset. I'd
like getting a sum field with any Model query. How can it be done?
Thank you very much.
--
David
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe fro
El miércoles, 13 de octubre de 2021 a las 15:43:39 UTC+2, Jeremy Evans
escribió:
> On Wed, Oct 13, 2021 at 1:49 AM David Espada wrote:
>
>> Hi.
>>
>> I need to define a synthtic field for a Sequel::Model source dataset. I'd
>> like getting a sum field with
Hi all.
There is a good little Sequel plugin called "delay_add_association" that
avoids persistence when adding a child (one_to_many) to an entity. That is
good in my
system, because I like to have a consistent object representation without
persisting nothing until the end of the work cycle.
But
2016-08-31 16:00 GMT+02:00 Jeremy Evans :
> I suppose that is something I would consider as an addition to
> delay_add_association. Do you want to work on a pull request for it?
>
> I have seen lightly the code and... it frightens me a little, but can try
it :)
What I wish is having changed beha
2016-08-31 18:40 GMT+02:00 Jeremy Evans :
> That's certainly not the behavior of delay_add_association in the *_many
> association case, so it wouldn't make sense for it to be the default in the
> one_to_one case. If you want that behavior, you can probably write your
> only plugin, or just do:
>
2016-09-01 10:34 GMT+02:00 David Espada :
>
> 2016-08-31 18:40 GMT+02:00 Jeremy Evans :
>
>> plugin :instance_hooks
>>
>> def association=(v)
>> after_save_hook{super}
>> end
>>
>
> I'll try it. Thank you very much.
>
2016-09-01 10:51 GMT+02:00 David Espada :
> I have tested and it doesn't wotk :(
>
Ouch! Now I understand that your example is not generic code, but a
redefinition of specific association code. Sorry :)
--
David
--
You received this message because you are subscribed to the Go
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
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
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
Hi everybody.
If I have this simple model:
--
class Operator < Sequel::Model
one_to_many :directions
end
class Direction < Sequel::Model
many_to_one :operator
end
--
I'd like to load an operator with all their directions in one quey. How can
I do it w
Hi.
I use Sequel with Postgresql and I am getting a postgresql exception when
passing to any date field a value like "02:02:", because of "" year.
I'd like to catch those errors in all date fields by default. Which is the best
option for doing so?
Thank yo very much.
--
David
Tanto es
12 matches
Mail list logo