Marc Funaro
09/20/2022, 8:15 PMCountries
table, we have an NCHAR(2) field for isoAlpha2 country codes (e.g., US
or DZ
or EN
, etc.). However, when I select a single country using ORM (e.g. c = EntityLoadByPK("Country", 220);
) the isoAlpha2 value comes back TRUNCATED to just a single letter (U
or D
or E
). As mentioned, I've tried the (deprecated) JDBC driver that comes with Lucee as well as the Microsoft JDBC extension. This same select / retrieval works fine in the Adobe CF version of the app that we are migrating from. I have checked all the possible datasource settings, to no avail. Any advice on troubleshooting from here would be welcome.Patrick
09/20/2022, 11:01 PMphilcruz
09/21/2022, 2:25 AMproperty name="countryID" fieldtype="id" generator="identity";
property name="name";
property name="isoAlpha2";
Patrick
09/21/2022, 2:38 AMPatrick
09/21/2022, 2:38 AMEvil Ware
09/21/2022, 2:39 AMPatrick
09/21/2022, 3:17 PMcountries
object to use, with just the object name it must search for one which it could be finding a different one possibly? Thats one theory. But did you try to just change the sqltype=
value to what you need it to be for that column?Marc Funaro
09/21/2022, 3:17 PMMarc Funaro
09/21/2022, 3:18 PMMarc Funaro
09/21/2022, 3:18 PMPatrick
09/21/2022, 3:18 PMproperty name="isoAlpha2" sqltype="char";
or string or whateverMarc Funaro
09/21/2022, 3:18 PMMarc Funaro
09/21/2022, 3:19 PMnchar
or char
does not fix.Marc Funaro
09/21/2022, 3:20 PMcountries
table or object it could be finding.Marc Funaro
09/21/2022, 3:20 PMMarc Funaro
09/21/2022, 3:20 PMPatrick
09/21/2022, 3:22 PMPatrick
09/21/2022, 3:22 PMMarc Funaro
09/21/2022, 3:22 PMMarc Funaro
09/21/2022, 3:22 PMPatrick
09/21/2022, 3:25 PMPatrick
09/21/2022, 3:26 PMPatrick
09/21/2022, 3:26 PMMarc Funaro
09/21/2022, 3:28 PMPatrick
09/21/2022, 3:31 PMPatrick
09/21/2022, 3:32 PMMarc Funaro
09/21/2022, 3:32 PMMarc Funaro
09/21/2022, 3:33 PMPatrick
09/21/2022, 3:34 PMzackster
09/21/2022, 4:10 PMMarc Funaro
09/21/2022, 4:51 PMMarc Funaro
09/21/2022, 4:54 PMorg.lucee.mssql-8.4.1.jre8.lex
-- into the deploy directory of lucee, but I'm getting the following error when lucee starts up:
"ERROR","main","09/21/2022","16:47:08","Extension","Unable to resolve org.lucee.mssql [57](R 57.0): missing requirement [org.lucee.mssql [57](R 57.0)] osgi.wiring.package; (osgi.wiring.package=org.bouncycastle.openssl) Unresolved requirements: [[org.lucee.mssql [57](R 57.0)] osgi.wiring.package; (osgi.wiring.package=org.bouncycastle.openssl)];lucee.runtime.exp.NativeException: Unable to resolve org.lucee.mssql [57](R 57.0): missing requirement [org.lucee.mssql [57](R 57.0)] osgi.wiring.package; (osgi.wiring.package=org.bouncycastle.openssl) Unresolved requirements: [[org.lucee.mssql [57](R 57.0)] osgi.wiring.package; (osgi.wiring.package=org.bouncycastle.openssl)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368)
Marc Funaro
09/21/2022, 4:54 PMMarc Funaro
09/21/2022, 4:56 PMMarc Funaro
09/21/2022, 11:50 PMEvil Ware
09/22/2022, 1:35 AMMarc Funaro
09/22/2022, 1:16 PMMarc Funaro
09/22/2022, 1:18 PMMarc Funaro
09/22/2022, 1:19 PMzackster
09/22/2022, 1:20 PMzackster
09/22/2022, 1:20 PMMarc Funaro
09/22/2022, 1:20 PMMarc Funaro
09/22/2022, 2:43 PMPatrick
09/22/2022, 4:51 PMproperty name="isoAlpha2" ormtype="string";
loads it as expected and same as example #2 which casts it as a string alsoPatrick
09/22/2022, 4:53 PMMarc Funaro
09/22/2022, 4:55 PMPatrick
09/22/2022, 4:57 PMPatrick
09/22/2022, 4:57 PMMarc Funaro
09/22/2022, 4:58 PMPatrick
09/22/2022, 5:01 PMMarc Funaro
09/22/2022, 5:32 PMMarc Funaro
09/22/2022, 5:33 PMEvil Ware
09/22/2022, 5:33 PMMarc Funaro
09/22/2022, 5:50 PMEvil Ware
09/22/2022, 5:54 PMMarc Funaro
09/22/2022, 6:03 PMselect * from countries
using Azure Studio or SSMS or any other DB client, I get the correct results. There's no hand-holding going on, and I don't think I am mis-using the datatype on the field (though one could successfully argue that we aren't going to need unicode on that particular piece of data). I would expect to see single character retrieval from the database itself if what you've postulated were in play.Patrick
09/22/2022, 6:07 PMPatrick
09/22/2022, 6:08 PMEvil Ware
09/22/2022, 6:13 PMEvil Ware
09/22/2022, 6:16 PMMarc Funaro
09/22/2022, 6:20 PMMarc Funaro
09/22/2022, 6:21 PMMarc Funaro
09/22/2022, 6:21 PMMarc Funaro
09/22/2022, 6:22 PMEvil Ware
09/22/2022, 7:01 PM