Hi David, Thank you very much for your enquiry. The code generator does resolve synonyms in Oracle databases, e.g. when a PL/SQL stored procedure returns a synonym of an OBJECT type, we'll resolve that to refer to the original object type.
SQL Server's synonyms are a bit less sophisticated, so object resolution is not really necessary. Nevertheless, it would be interesting to have a generated Synonyms.java class, where all synonyms would be listed, referring to the physical object (or to another synonym). There's a pending feature request for this: https://github.com/jOOQ/jOOQ/issues/1563 I suspect we could re-evaluate its implementation for the upcoming jOOQ 3.8. What's your expectation towards this feature? Best Regards, Lukas 2016-04-07 21:37 GMT+02:00 David Scott <[email protected]>: > Been using Jooq for a while, but this is the first time we've tried it > with Synonyms and Views. The problem I'm running into is that the > generator is not picking up on the synonyms (although the views work fine). > Does the generator not support synonyms? > > Here's the gradle code I'm using to run the generator: > > // Task for generating jOOQ model objects > task generate << { > def writer = new StringWriter() > def xml = new groovy.xml.MarkupBuilder(writer) > .configuration('xmlns': > 'http://www.jooq.org/xsd/jooq-codegen-3.6.0.xsd') { > jdbc() { > driver('com.microsoft.sqlserver.jdbc.SQLServerDriver') > url('jdbc:sqlserver://10.2.100.42:1433;databaseName=test_sandbox') > schema('dbo') > user('test_user') > password('XXXX') > } > generator() { > database() { > } > generate() { > } > target() { > packageName('org.advanced.testapi.v2.jooq') > directory('src/main/java') > } > } > } > > // Run the code generator > // ---------------------- > org.jooq.util.GenerationTool.main( > javax.xml.bind.JAXB.unmarshal( > new StringReader(writer.toString()), > org.jooq.util.jaxb.Configuration.class > ) > ) > } > > > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
