Did we stop returning IDENTITYCOL in inserts in Lu...
# lucee
s
Did we stop returning IDENTITYCOL in inserts in Lucee 6? Getting an issue with it and attempting to isolate it, maybe a MSSQL thing, not sure yet.
r
Is your PK auto-incremented numeric? While I don't use MSSQL a lot, that did trip me up using GUIDs
I was also using MySQL
s
It's auto-incremented numeric, yeah.
👍 1
r
I would expect it to be returned as well
s
Yeah, it's broken. auto-incremented numeric ID column and 'test' varchar column.
Copy code
<cfscript>
    queryExecute("insert into test (testfield)
        values ( :test ) ", 
        {
            "test": {"value":"test", "sqltype":"varchar"}
        },
        { "result":"meh" }
    );

    dump(meh);
</cfscript>
Output:
So another undocumented breaking issue, I believe.
MSSQL, using Lucee 6, JDBC driver version 11 (because version 12 is totally broken on Lucee 6) JRE for Java11.
Copy code
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[test](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[testfield] [varchar](50) NOT NULL,
 CONSTRAINT [PK_test] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
Table creation script, for those who want to try to replicate.
Ticket for major issue: IDENTITYCOL reference in Lucee 6: https://luceeserver.atlassian.net/browse/LDEV-4830
At this point, kind of wondering if Lucee 6 was even tested against SQL Server, especially considering this issue: https://cfml.slack.com/archives/C06TA0A9W/p1711402774009559
sigh Problem magically fixed itself over the weekend, no idea why. I'll see if I can isolate and reproduce consistently. I can't figure out what might have happened, outside of a possible server restart over the weekend.