Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

driver.Valuer.Value will call three times. 自定义实现的 driver.ValuerValue 方法,会被调用 3 次 #773

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

niluan304
Copy link

Explain your user case and expected results

I got

INSERT INTO
    `model` (
        `created_at`,
        `updated_at`,
        `deleted_at`,
        `json_field`
    )
VALUES
    (
        '2024-11-22 21:16:31.699',
        '2024-11-22 21:16:31.699',
        NULL,
       -- should be  '{"array":["A1","B1","C1"]}'
        '{"array":["A111","B111","C111"]}'
    )

看起来,这行代码,被执行了 3次:

j.Array[i] += "1" // 我想要修改(加密)原来的字段,I want to modify/encrypt the fields

@niluan304 niluan304 force-pushed the call-custom-method-three-times branch from 6bf7190 to 18799bb Compare November 22, 2024 19:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant