Skip to content

fix(model): BoxLang + Oracle finders return oracle.sql.TIMESTAMP objects instead of CFML dates #3719

Closed

Description

@bpamiri

On BoxLang + Oracle, model finders return datetime/timestamp columns as raw oracle.sql.TIMESTAMP driver objects instead of CFML dates. This was found while fixing #3715 (PR #3718): bulkOperationsSpec read found.createdAt[1] from findAll() and Len() threw Cannot determine length of object of type oracle.sql.TIMESTAMP.

User impact

I checked this against a real oracle.sql.TIMESTAMP on BoxLang (bx-oracle driver), local container:

call result
IsDate(ts) false
DateFormat(ts, "yyyy-mm-dd") throws Can't cast [2026-07-25 17:20:00.0] to a String.
DateCompare(ts, Now()) throws (same)
DateDiff("d", ts, Now()) throws (same)
"" & ts (any output or concatenation) throws Can't cast oracle.sql.TIMESTAMP to a string.
Len(ts) throws Cannot determine length of object of type oracle.sql.TIMESTAMP
SerializeJSON({d = ts}) emits driver internals: {"D":{"bytes":"eH4HGRIVAQ==","length":7,...}}

So on BoxLang + Oracle, any app that formats, compares, outputs, or JSON-renders a timestamp column from a finder breaks. That covers createdAt/updatedAt in views and renderWith() APIs.

Existing workarounds (to remove with the fix)

Proposal

Normalize datetime-typed columns in finder results, so every engine hands app code a CFML date. $normalizeDbTimestamp() already exists for this. Apply it only to columns the model's property metadata marks as datetime/timestamp, and only when a value is not already a date, so the cost on engines that already return dates stays small. With the fix, remove the spec workarounds above so the specs assert the real contract.

Not fixed yet: the 4.1.1-or-follow-up decision is pending with the maintainer.

Activity

  1. added
    boxlangBoxLang-specific compatibility issue; tracked but may not gate Lucee/Adobe releases
    on Sep 27, 2026
  2. added 4 commits that reference this issue on Sep 27, 2026
    bf7d6a0
    7aea9ad
    734ed92
    33091b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    boxlangBoxLang-specific compatibility issue; tracked but may not gate Lucee/Adobe releasesbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions