Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Not using namespaces for set seems to be wrong #810

Open
blaggacao opened this issue Jul 18, 2024 · 0 comments
Open

Not using namespaces for set seems to be wrong #810

blaggacao opened this issue Jul 18, 2024 · 0 comments

Comments

@blaggacao
Copy link

blaggacao commented Jul 18, 2024

field=field.get_sql(**dict(kwargs, with_namespace=False)), value=value.get_sql(**kwargs)

This is perfecly legal SQL:

    UPDATE `tabList of Contacts Member` locm
    JOIN `tabContact` c ON c.name = locm.contact
    SET locm.unsubscribed = 1  --- note the namespaced column here, without it, this query is ambiguous
    WHERE (locm.unsubscribed IS NULL OR locm.unsubscribed = 0)
      AND c.unsubscribed = 1

If this name spacing was disabled for a particular reason, maybe a code comment would help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant