RelationalDatabase connector

Cantor, Scott cantor.2 at osu.edu
Wed Mar 18 14:07:42 EDT 2015


On 3/18/15, 1:38 PM, "Arnal, Pascal" <Pascal.Arnal at lacapitale.com> wrote:

>I have a connector that search user attributes in one database with one dependency.
>
>        <resolver:DataConnector id="SQL" xsi:type="dc:RelationalDatabase">
>                <resolver:Dependency ref="USER_DEPENDENCY" />
>                <dc:ContainerManagedConnection resourceName="%{idp.attribute.resolver.SQL.jndiName}" />
>                <dc:QueryTemplate>
>                        <![CDATA[
>                                SELECT *  FROM MyTable WHERE MyColumn IN ($USER_DEPENDENCY )

Is the dependency an AttributeDefinition? I don't know exactly if it works to try and expand multiple values out like that, I'm looking at the statement builders now. I've used dependencies of that sort but only single-valued data and only via dependency on other data connectors.

I would indeed assume that you can't yourself have commas inside the data being treated as literal commas. At least not without overriding built-in behavior with some kind of plugin.

I believe you can build your own statement builder plugin and use that with the DataConnector if necessary.

Another ugly workaround might be to build up the statement more programatically in Velocity macro-speak by using a #foreach to iterate the values inside the in () clause.

-- Scott



More information about the users mailing list