Column aliasing in mysql not working

george123456 george at twig.tk
Thu Feb 22 09:41:32 EST 2018


Hi,
    While trying to create a quite complex query to form an attribute for
the Talis Aspire Reading lists we made the discovery that while column
aliasing works in Microsoft SQL Server, it does not in mysql. (It does work
when we query outside of Shibboleth ) 

The log entries for MSSQL is :
Search Query: SELECT srs_module_ref as um_um   FROM  t_modules
Retrieved attributes: [um_um]                                   ##
Successfully retrieves the alias

and for mysql :
Search Query: SELECT srs_module_ref as um_um   FROM  t_modules
Retrieved attributes: [srs_module]                            ## Ignores
alias and retrieves column name


The entry in attribute-resolver.xml is shown below ( we are on Shibboleth
2.44 ) 



<resolver:AttributeDefinition xsi:type="ad:Simple" id="talis_attr"
sourceAttributeID="um_um">

    <resolver:Dependency ref="MyDatabase"   />
    <resolver:AttributeEncoder xsi:type="enc:SAML2String"
                               name="urn:oid:1.3.6.1.4.1.5923.1.1.1.7"
                               friendlyName="eduPersonEntitlement" />

</resolver:AttributeDefinition>

<resolver:DataConnector xsi:type="RelationalDatabase"
xmlns="urn:mace:shibboleth:2.0:resolver:dc"
                        id="MyDatabase" >

    <ApplicationManagedConnection jdbcDriver="com.mysql.jdbc.Driver"
                                 
jdbcURL="jdbc:mysql://172.18.200.38:3306/talis"
                                  jdbcUserName="user123"
                                  jdbcPassword="password123" />

    <QueryTemplate>
        
    </QueryTemplate>

</resolver:DataConnector>







--
Sent from: http://shibboleth.1660669.n2.nabble.com/Shibboleth-Users-f1660767.html


More information about the users mailing list