Skip to content

Conversation

@joboon
Copy link
Contributor

@joboon joboon commented Oct 27, 2025

Description

One-to-one or one-to-many relationships which have LOB types in the child table fail when the size of the LOB exceeds 32767 characters (the max length for VARCHAR2). The merge statement assigns a bind variable which is typed as just a string or []byte. The fix converts the string or []byte bind variable to a godror.Lob object when its size exceeds MaxInt16.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I have added two new tests which produce this behavior and validate the fixes. You can uncomment the fixes in common.go to see the original failure.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 27, 2025
@joboon joboon marked this pull request as ready for review October 27, 2025 17:55
@joboon joboon force-pushed the OnConflictLobFixes branch from 00c535a to b0725eb Compare October 27, 2025 18:05
Copy link
Contributor

@ting-lan-wang ting-lan-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting the fix!
The changes look good to me.

@ting-lan-wang ting-lan-wang merged commit 670eadb into oracle-samples:main Oct 28, 2025
1 check passed
@joboon joboon mentioned this pull request Nov 6, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants