Skip to content

#write_lobs called only on update but not on create #2226

@akostadinov

Description

@akostadinov

I'm not exactly sure whether this is an issue or expected behavior. I didn't observe any error and I'm not an experienced Oracle dba. It just looks strange.

Steps to reproduce

run test should serialize LOBs when creating a record from #2203

Expected behavior

#write_lobs is called

  TestEmployee Create (77.7ms)  INSERT INTO "TEST_EMPLOYEES" ("FIRST_NAME", "LAST_NAME", "SIGNATURE", "ID") VALUES (:a1, :a2, :a3, :a4)  [["first_name", "Peter"], ["last_name", "Doe"], ["signature", "cGV0ZXInc3NpZ25hdHVyZQ==\n"], ["id", 1]]
  Writable Large Object (2.4ms)  SELECT "SIGNATURE" FROM "TEST_EMPLOYEES" WHERE "ID" = 1 FOR UPDATE

Actual behavior

#write_lobs is not called

  TestEmployee Create (77.7ms)  INSERT INTO "TEST_EMPLOYEES" ("FIRST_NAME", "LAST_NAME", "SIGNATURE", "ID") VALUES (:a1, :a2, :a3, :a4)  [["first_name", "Peter"], ["last_name", "Doe"], ["signature", "cGV0ZXInc3NpZ25hdHVyZQ==\n"], ["id", 1]]

System configuration

Rails version:
Same as test code in master.

Oracle enhanced adapter version:
Master branch.

Ruby version:
2.7.3p183

Oracle Database version:
19.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions