Hi Jürgen, That was one of the first things I tried—formatting the array as PostgreSQL would expect to see it via, say, psql and then just trying to ram it through! As with other approaches I've tried, it gets you close, but not quite there. Firstly:
2022-11-03 04:41:37.922 WARN NSLog - *** JDBCAdaptor : no type info found for text[] Doesn't seem to like "text[]" as an external type, though I am not sure how important that is. And then: EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.PostgresqlExpression: "UPDATE ... Next exception:SQL State:42846 -- error code: 0 -- msg: ERROR: cannot cast type bytea to text[] On 3 Nov 2022, at 00:21, Jürgen Tabert <jtab...@htgreenline.de> wrote: > Maybe you should try the easy way. > The data type text[] requires curly brackets. > > Q&D > > public static String postgesqlTextArrayFromNSArray(NSArray<String> > stringArray) { > StringJoiner sj = new StringJoiner(",", "{", "}"); > for (String s : stringArray) { > sj.add(s); > } > return sj.toString(); > } > > { > adaptorValueConversionClassName = > "de.htgreenline.divas.prototypes.ValueConversion"; > adaptorValueConversionMethodName = postgesqlTextArrayFromNSArray; > columnName = newAttribute; > externalType = "text[]"; > factoryMethodArgumentType = EOFactoryMethodArgumentIsNSString; > name = newAttribute; > valueClassName = "com.webobjects.foundation.NSArray"; > valueFactoryClassName = "de.htgreenline.divas.prototypes.ValueFactory"; > valueFactoryMethodName = stringArrayFromTextArray; > } -- Paul Hoadley https://logicsquad.net/ https://www.linkedin.com/company/logic-squad/
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com