Skip to content

Conversation

@miladev95
Copy link
Contributor

  • [ x] Do only one thing
  • [ x] Non breaking API changes
  • [ x] Tested

What did this pull request do?

Replace a negated conjunction in schema/relationship.go flagged by staticcheck QF1001.

User Case Description

Changes:

Edited schema/relationship.go to replace !(A && B && C) style check with A != x || B != y || C != z (logical equivalent without negated &&).

Why:

Satisfies staticcheck QF1001 recommendation without changing behavior.

@propel-code-bot
Copy link
Contributor

Replace negated conjunction flagged by staticcheck QF1001

This MINOR PR addresses a single staticcheck (QF1001) warning in schema/relationship.go. The condition that previously used a negated compound && expression is rewritten to an equivalent series of || comparisons, improving readability and complying with the linter recommendation without altering behavior.

Key Changes

• Updated conditional in Relationship.ParseConstraint() loop: replaced !(A && B && C) with A != x || B != y || C != z.
• Net diff: +3 / -2 lines, no API or behavioral change.

Affected Areas

• logic that detects duplicate BelongsTo constraints inside Relationship.ParseConstraint() in schema/relationship.go

This summary was automatically generated by @propel-code-bot

@jinzhu jinzhu merged commit 6e7eb0a into go-gorm:master Nov 16, 2025
26 checks passed
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

Successfully merging this pull request may close these issues.

2 participants