Re: Two newbie questions

2014-01-06 Thread Lukas Eder
Hi Marko,

2013/10/9 Marko Topolnik 

>
> On Wednesday, October 9, 2013 2:22:12 PM UTC+2, Lukas Eder wrote:
>>
>>
>> 2013/10/9 Marko Topolnik 
>>
>>>
>
>> By now I have integrated JOOQ into my nascent application and have the
>>> Maven plugin configuration in place. However, now I'm facing difficulties
>>> with per-developer configuration of database URL and credentials. Can these
>>> be specified at the command line, via some -D options?
>>>
>>
>> You can override schema and table names at code-generation time:
>> http://www.jooq.org/doc/3.1/manual/code-generation/schema-mapping/
>>
>> ... or at runtime:
>> http://www.jooq.org/doc/3.1/manual/sql-building/dsl-
>> context/runtime-schema-mapping/
>>
>> Database URL and credentials are outside of jOOQ's scope, as you're
>> passing a pre-initialised JDBC Connection to jOOQ.
>>
>
> What I meant was, the code generator configuration includes database URL
> credentials. I would like to specify these on the command line instead of
> hard-wiring them into the git-committed pom.xml.
>

While working on a new jOOQ/Spring tutorial, I stumbled upon Petri
Kainulainen's excellent posts about jOOQ and Maven in general. Here's a
post that might be interesting to you with respect to your requirement:
http://www.petrikainulainen.net/programming/tips-and-tricks/creating-profile-specific-configuration-files-with-maven/

With Maven, you can load external properties based on profiles. That way,
you can configure different developer / staging / testing / production
profiles with different database connections.

As that should sufficiently cover your use-case, I have closed #2772:
https://github.com/jOOQ/jOOQ/issues/2772

Cheers
Lukas

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-11 Thread Lukas Eder
2013/10/11 Lukas Eder 

> Rakesh! :-)
>
>
> 2013/10/11 Rakesh Waghela 
>
>> Should it be possible to add the additional parameters to JOOQ Codegen
>> XML as part of jdbc element ?
>>
>>   
>> 
>> jdbc:postgresql://host:port/?ssl=true&sslfactory=
>> org.postgresql.ssl.NonValidatingFactory;
>> gtskstnfispdcz
>> rEAqWJTm6ZbgMqrE0m688LyXHh
>>   
>>
>> Why ?
>> Because the XML reader implemented in JOOQ fails to read parameters
>> attached with jdbc url and separated by "&"
>> Creating a PostgreSQL JDBC connection with extra parameters causes a
>> SAXParseException
>> https://netbeans.org/bugzilla/show_bug.cgi?format=multiple&id=181133
>>
>> My be it's time to use some alternate XML reader ?
>>
>
> Instead of the JDK's JAXB implementation? Or... maybe it's time to write
> valid XML? :-)
>
> try: &
>

(sorry for the sarcasm)

... or am I missing something?

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-11 Thread Lukas Eder
Rakesh! :-)


2013/10/11 Rakesh Waghela 

> Should it be possible to add the additional parameters to JOOQ Codegen XML
> as part of jdbc element ?
>
>   
> 
> jdbc:postgresql://host:port/?ssl=true&sslfactory=
> org.postgresql.ssl.NonValidatingFactory;
> gtskstnfispdcz
> rEAqWJTm6ZbgMqrE0m688LyXHh
>   
>
> Why ?
> Because the XML reader implemented in JOOQ fails to read parameters
> attached with jdbc url and separated by "&"
> Creating a PostgreSQL JDBC connection with extra parameters causes a
> SAXParseException
> https://netbeans.org/bugzilla/show_bug.cgi?format=multiple&id=181133
>
> My be it's time to use some alternate XML reader ?
>

Instead of the JDK's JAXB implementation? Or... maybe it's time to write
valid XML? :-)

try: &

Hope this helps,
Lukas


>
>
> On Wednesday, October 9, 2013 7:27:41 PM UTC+5:30, Lukas Eder wrote:
>>
>>
>>
>>
>> 2013/10/9 Marko Topolnik 
>>
>>>
>>>
>>> On Wednesday, October 9, 2013 3:13:09 PM UTC+2, Lukas Eder wrote:


 2013/10/9 Marko Topolnik 

>
> On Wednesday, October 9, 2013 2:22:12 PM UTC+2, Lukas Eder wrote:
>>
>>
>> 2013/10/9 Marko Topolnik 
>>
>>>
>
>> By now I have integrated JOOQ into my nascent application and have
>>> the Maven plugin configuration in place. However, now I'm facing
>>> difficulties with per-developer configuration of database URL and
>>> credentials. Can these be specified at the command line, via some -D
>>> options?
>>>
>>
>> You can override schema and table names at code-generation time:
>> http://www.jooq.org/doc/3.1/**manual/code-generation/schema-**ma*
>> ***pping/
>>
>> ... or at runtime:
>> http://www.jooq.org/doc/3.1/**manual/sql-building/dsl-**context/*
>> ***runtime-schema-**mapping/
>>
>> Database URL and credentials are outside of jOOQ's scope, as you're
>> passing a pre-initialised JDBC Connection to jOOQ.
>>
>
>
> What I meant was, the code generator configuration includes database
> URL credentials. I would like to specify these on the command line instead
> of hard-wiring them into the git-committed pom.xml.
>

 This doesn't work right now. You can, however, configure jOOQ's code
 generator programmatically by passing a Configuration to the 
 GenerationTool:

 org.jooq.util.GenerationTool.**m**ain(org.jooq.util.jaxb.**Configu*
 *ration configuration)

 That way, you can re-configure anything you want. I'm aware that this
 is a bit tedious, as you'll have to wrap the jOOQ code generation plugin in
 your own Maven plugin...

 I'll think about supporting command line options in a future release:
 https://github.com/jOOQ/jOOQ/**i**ssues/2772

>>>
>>> Thanks for that. I think my best option would be to just add a main
>>> method to my application which would do the code generation. I could run
>>> that from maven with the plain exec:java.
>>>
>>
>> True.
>>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-11 Thread Rakesh Waghela
Should it be possible to add the additional parameters to JOOQ Codegen XML 
as part of jdbc element ?

  

jdbc:postgresql://host:port/?ssl=true&sslfactory=
org.postgresql.ssl.NonValidatingFactory;
gtskstnfispdcz
rEAqWJTm6ZbgMqrE0m688LyXHh
  

Why ? 
Because the XML reader implemented in JOOQ fails to read parameters 
attached with jdbc url and separated by "&"
Creating a PostgreSQL JDBC connection with extra parameters causes a 
SAXParseException
https://netbeans.org/bugzilla/show_bug.cgi?format=multiple&id=181133

My be it's time to use some alternate XML reader ?

On Wednesday, October 9, 2013 7:27:41 PM UTC+5:30, Lukas Eder wrote:
>
>
>
>
> 2013/10/9 Marko Topolnik >
>
>>
>>
>> On Wednesday, October 9, 2013 3:13:09 PM UTC+2, Lukas Eder wrote:
>>>
>>>
>>> 2013/10/9 Marko Topolnik 
>>>

 On Wednesday, October 9, 2013 2:22:12 PM UTC+2, Lukas Eder wrote:
>
>
> 2013/10/9 Marko Topolnik 
>
>>  

> By now I have integrated JOOQ into my nascent application and have the 
>> Maven plugin configuration in place. However, now I'm facing 
>> difficulties 
>> with per-developer configuration of database URL and credentials. Can 
>> these 
>> be specified at the command line, via some -D options?
>>
>
> You can override schema and table names at code-generation time:
> http://www.jooq.org/doc/3.1/**ma**nual/code-generation/schema-**ma**
> pping/
>
> ... or at runtime:
> http://www.jooq.org/doc/3.1/**ma**nual/sql-building/dsl-**context/**
> runtime-schema-**mapping/
>
> Database URL and credentials are outside of jOOQ's scope, as you're 
> passing a pre-initialised JDBC Connection to jOOQ.
>


 What I meant was, the code generator configuration includes database 
 URL credentials. I would like to specify these on the command line instead 
 of hard-wiring them into the git-committed pom.xml.

>>>
>>> This doesn't work right now. You can, however, configure jOOQ's code 
>>> generator programmatically by passing a Configuration to the GenerationTool:
>>>
>>> org.jooq.util.GenerationTool.**main(org.jooq.util.jaxb.**Configuration 
>>> configuration)
>>>
>>> That way, you can re-configure anything you want. I'm aware that this is 
>>> a bit tedious, as you'll have to wrap the jOOQ code generation plugin in 
>>> your own Maven plugin...
>>>
>>> I'll think about supporting command line options in a future release:
>>> https://github.com/jOOQ/jOOQ/**issues/2772
>>>
>>
>> Thanks for that. I think my best option would be to just add a main 
>> method to my application which would do the code generation. I could run 
>> that from maven with the plain exec:java.
>>
>
> True. 
>

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-09 Thread Lukas Eder
2013/10/9 Marko Topolnik 

>
>
> On Wednesday, October 9, 2013 3:13:09 PM UTC+2, Lukas Eder wrote:
>>
>>
>> 2013/10/9 Marko Topolnik 
>>
>>>
>>> On Wednesday, October 9, 2013 2:22:12 PM UTC+2, Lukas Eder wrote:


 2013/10/9 Marko Topolnik 

>
>>>
 By now I have integrated JOOQ into my nascent application and have the
> Maven plugin configuration in place. However, now I'm facing difficulties
> with per-developer configuration of database URL and credentials. Can 
> these
> be specified at the command line, via some -D options?
>

 You can override schema and table names at code-generation time:
 http://www.jooq.org/doc/3.1/**ma**nual/code-generation/schema-**ma**
 pping/

 ... or at runtime:
 http://www.jooq.org/doc/3.1/**ma**nual/sql-building/dsl-**context/**
 runtime-schema-**mapping/

 Database URL and credentials are outside of jOOQ's scope, as you're
 passing a pre-initialised JDBC Connection to jOOQ.

>>>
>>>
>>> What I meant was, the code generator configuration includes database URL
>>> credentials. I would like to specify these on the command line instead of
>>> hard-wiring them into the git-committed pom.xml.
>>>
>>
>> This doesn't work right now. You can, however, configure jOOQ's code
>> generator programmatically by passing a Configuration to the GenerationTool:
>>
>> org.jooq.util.GenerationTool.**main(org.jooq.util.jaxb.**Configuration
>> configuration)
>>
>> That way, you can re-configure anything you want. I'm aware that this is
>> a bit tedious, as you'll have to wrap the jOOQ code generation plugin in
>> your own Maven plugin...
>>
>> I'll think about supporting command line options in a future release:
>> https://github.com/jOOQ/jOOQ/**issues/2772
>>
>
> Thanks for that. I think my best option would be to just add a main method
> to my application which would do the code generation. I could run that from
> maven with the plain exec:java.
>

True.

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-09 Thread Marko Topolnik


On Wednesday, October 9, 2013 3:13:09 PM UTC+2, Lukas Eder wrote:
>
>
> 2013/10/9 Marko Topolnik >
>
>>
>> On Wednesday, October 9, 2013 2:22:12 PM UTC+2, Lukas Eder wrote:
>>>
>>>
>>> 2013/10/9 Marko Topolnik 
>>>
  
>>
>>> By now I have integrated JOOQ into my nascent application and have the 
 Maven plugin configuration in place. However, now I'm facing difficulties 
 with per-developer configuration of database URL and credentials. Can 
 these 
 be specified at the command line, via some -D options?

>>>
>>> You can override schema and table names at code-generation time:
>>> http://www.jooq.org/doc/3.1/**manual/code-generation/schema-**mapping/
>>>
>>> ... or at runtime:
>>> http://www.jooq.org/doc/3.1/**manual/sql-building/dsl-**
>>> context/runtime-schema-**mapping/
>>>
>>> Database URL and credentials are outside of jOOQ's scope, as you're 
>>> passing a pre-initialised JDBC Connection to jOOQ.
>>>
>>
>>
>> What I meant was, the code generator configuration includes database URL 
>> credentials. I would like to specify these on the command line instead of 
>> hard-wiring them into the git-committed pom.xml.
>>
>
> This doesn't work right now. You can, however, configure jOOQ's code 
> generator programmatically by passing a Configuration to the GenerationTool:
>
> org.jooq.util.GenerationTool.main(org.jooq.util.jaxb.Configuration 
> configuration)
>
> That way, you can re-configure anything you want. I'm aware that this is a 
> bit tedious, as you'll have to wrap the jOOQ code generation plugin in your 
> own Maven plugin...
>
> I'll think about supporting command line options in a future release:
> https://github.com/jOOQ/jOOQ/issues/2772
>

Thanks for that. I think my best option would be to just add a main method 
to my application which would do the code generation. I could run that from 
maven with the plain exec:java. 

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-09 Thread Lukas Eder
2013/10/9 Marko Topolnik 

>
> On Wednesday, October 9, 2013 2:22:12 PM UTC+2, Lukas Eder wrote:
>>
>>
>> 2013/10/9 Marko Topolnik 
>>
>>>
>
>> By now I have integrated JOOQ into my nascent application and have the
>>> Maven plugin configuration in place. However, now I'm facing difficulties
>>> with per-developer configuration of database URL and credentials. Can these
>>> be specified at the command line, via some -D options?
>>>
>>
>> You can override schema and table names at code-generation time:
>> http://www.jooq.org/doc/3.1/**manual/code-generation/schema-**mapping/
>>
>> ... or at runtime:
>> http://www.jooq.org/doc/3.1/**manual/sql-building/dsl-**
>> context/runtime-schema-**mapping/
>>
>> Database URL and credentials are outside of jOOQ's scope, as you're
>> passing a pre-initialised JDBC Connection to jOOQ.
>>
>
>
> What I meant was, the code generator configuration includes database URL
> credentials. I would like to specify these on the command line instead of
> hard-wiring them into the git-committed pom.xml.
>

This doesn't work right now. You can, however, configure jOOQ's code
generator programmatically by passing a Configuration to the GenerationTool:

org.jooq.util.GenerationTool.main(org.jooq.util.jaxb.Configuration
configuration)

That way, you can re-configure anything you want. I'm aware that this is a
bit tedious, as you'll have to wrap the jOOQ code generation plugin in your
own Maven plugin...

I'll think about supporting command line options in a future release:
https://github.com/jOOQ/jOOQ/issues/2772

Cheers
Lukas

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-09 Thread Marko Topolnik

On Wednesday, October 9, 2013 2:22:12 PM UTC+2, Lukas Eder wrote:
>
>
> 2013/10/9 Marko Topolnik >
>
>>  

> By now I have integrated JOOQ into my nascent application and have the 
>> Maven plugin configuration in place. However, now I'm facing difficulties 
>> with per-developer configuration of database URL and credentials. Can these 
>> be specified at the command line, via some -D options?
>>
>
> You can override schema and table names at code-generation time:
> http://www.jooq.org/doc/3.1/manual/code-generation/schema-mapping/
>
> ... or at runtime:
>
> http://www.jooq.org/doc/3.1/manual/sql-building/dsl-context/runtime-schema-mapping/
>
> Database URL and credentials are outside of jOOQ's scope, as you're 
> passing a pre-initialised JDBC Connection to jOOQ.
>


What I meant was, the code generator configuration includes database URL 
credentials. I would like to specify these on the command line instead of 
hard-wiring them into the git-committed pom.xml.

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-09 Thread Lukas Eder
2013/10/9 Marko Topolnik 

> Thanks for the info.. yes, I was thinking the same: give the user an
> option to generate fluent setters since there are many use cases where that
> creates no issues and is clearly more comfortable to write plain Java
> against.
>
> By now I have integrated JOOQ into my nascent application and have the
> Maven plugin configuration in place. However, now I'm facing difficulties
> with per-developer configuration of database URL and credentials. Can these
> be specified at the command line, via some -D options?
>

You can override schema and table names at code-generation time:
http://www.jooq.org/doc/3.1/manual/code-generation/schema-mapping/

... or at runtime:
http://www.jooq.org/doc/3.1/manual/sql-building/dsl-context/runtime-schema-mapping/

Database URL and credentials are outside of jOOQ's scope, as you're passing
a pre-initialised JDBC Connection to jOOQ.

Cheers
Lukas


>
>
> On Sunday, October 6, 2013 10:53:54 AM UTC+2, Lukas Eder wrote:
>
>> #674 is implemented on GitHub master and will be included in jOOQ 3.2
>>
>>
>> 2013/10/6 Lukas Eder 
>>
>>> Hello,
>>>
>>> 2013/10/5 Marko Topolnik 
>>>
>>>  I am currently evaluating JOOQ as a candidate to use in a new project.
 My current experience amounts to reading the documentation and running code
 generation against a single table. Two questions have arisen during my
 evaluation:

 1. What's happening with the Maven codegen plugin? I can't find any
 documentation on the main JOOQ page except a brief mention in the
 documentation of the old 2.4 version. I have also found
 JOOQ-codegen-maven-example, but it's not at all obvious to me how to cull
 knowledge from that source.

>>>
>>> Please refer to this page:
>>> http://www.jooq.org/doc/3.1/**manual/code-generation/**
>>> codegen-configuration/#N12E2C
>>>
>>> Essentially, the jooq-codegen-maven plugin uses the same XML
>>> configuration format as the standalone code generator. I've added some
>>> clarification to the manual. A manual update will be published soon:
>>> https://github.com/jOOQ/jOOQ/**commit/**77a989236855a42004a4c9aa8d1a17**
>>> e77d10c0df
>>>
>>>
 2. The generated record class uses classic JavaBeans-style getters and
 setters. How come these are not implemented in the Fluent API style?

>>>
>>> There's a pending feature request for this:
>>> https://github.com/jOOQ/jOOQ/**issues/674
>>>
>>> I agree that fluent setters might be useful to many users. However, I
>>> think that returning non-void would be against the JavaBeans specification.
>>> This is important if jOOQ records or POJOs are used with EL in JSP or JSF
>>> pages, for instance.
>>>
>>> I remember having encountered setters returning "this" as not supported
>>> by earlier versions of Spring, although they seem to have "fixed" it in
>>> version 3.1 (see §3.1.9 from http://docs.spring.io/**
>>> spring/docs/3.1.0.M2/spring-**framework-reference/html/new-**in-3.1.html
>>> )
>>>
>>> Also, an interesting discussion can be seen here:
>>> http://stackoverflow.com/q/**5741369/521799
>>>
>>> I tend to say that it would be a bad idea to change the return type on
>>> generated setters. But adding a code-generation flag to modify this
>>> behaviour might do the trick to suit all use-cases. I have updated #674 to
>>> take such a flag into account:
>>> https://github.com/jOOQ/jOOQ/**issues/674
>>>
>>> Cheers
>>> Lukas
>>>
>>
>>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-09 Thread Marko Topolnik
Thanks for the info.. yes, I was thinking the same: give the user an option 
to generate fluent setters since there are many use cases where that 
creates no issues and is clearly more comfortable to write plain Java 
against.

By now I have integrated JOOQ into my nascent application and have the 
Maven plugin configuration in place. However, now I'm facing difficulties 
with per-developer configuration of database URL and credentials. Can these 
be specified at the command line, via some -D options?

On Sunday, October 6, 2013 10:53:54 AM UTC+2, Lukas Eder wrote:
>
> #674 is implemented on GitHub master and will be included in jOOQ 3.2
>
>
> 2013/10/6 Lukas Eder >
>
>> Hello,
>>
>> 2013/10/5 Marko Topolnik >
>>
>>> I am currently evaluating JOOQ as a candidate to use in a new project. 
>>> My current experience amounts to reading the documentation and running code 
>>> generation against a single table. Two questions have arisen during my 
>>> evaluation:
>>>
>>> 1. What's happening with the Maven codegen plugin? I can't find any 
>>> documentation on the main JOOQ page except a brief mention in the 
>>> documentation of the old 2.4 version. I have also found 
>>> JOOQ-codegen-maven-example, but it's not at all obvious to me how to cull 
>>> knowledge from that source.
>>>
>>
>> Please refer to this page:
>>
>> http://www.jooq.org/doc/3.1/manual/code-generation/codegen-configuration/#N12E2C
>>
>> Essentially, the jooq-codegen-maven plugin uses the same XML 
>> configuration format as the standalone code generator. I've added some 
>> clarification to the manual. A manual update will be published soon:
>>
>> https://github.com/jOOQ/jOOQ/commit/77a989236855a42004a4c9aa8d1a17e77d10c0df
>>  
>>
>>> 2. The generated record class uses classic JavaBeans-style getters and 
>>> setters. How come these are not implemented in the Fluent API style?
>>>
>>
>> There's a pending feature request for this:
>> https://github.com/jOOQ/jOOQ/issues/674
>>
>> I agree that fluent setters might be useful to many users. However, I 
>> think that returning non-void would be against the JavaBeans specification. 
>> This is important if jOOQ records or POJOs are used with EL in JSP or JSF 
>> pages, for instance.
>>
>> I remember having encountered setters returning "this" as not supported 
>> by earlier versions of Spring, although they seem to have "fixed" it in 
>> version 3.1 (see §3.1.9 from 
>> http://docs.spring.io/spring/docs/3.1.0.M2/spring-framework-reference/html/new-in-3.1.html
>> )
>>
>> Also, an interesting discussion can be seen here:
>> http://stackoverflow.com/q/5741369/521799
>>
>> I tend to say that it would be a bad idea to change the return type on 
>> generated setters. But adding a code-generation flag to modify this 
>> behaviour might do the trick to suit all use-cases. I have updated #674 to 
>> take such a flag into account:
>> https://github.com/jOOQ/jOOQ/issues/674
>>
>> Cheers
>> Lukas
>>  
>
>

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-06 Thread Lukas Eder
#674 is implemented on GitHub master and will be included in jOOQ 3.2


2013/10/6 Lukas Eder 

> Hello,
>
> 2013/10/5 Marko Topolnik 
>
>> I am currently evaluating JOOQ as a candidate to use in a new project. My
>> current experience amounts to reading the documentation and running code
>> generation against a single table. Two questions have arisen during my
>> evaluation:
>>
>> 1. What's happening with the Maven codegen plugin? I can't find any
>> documentation on the main JOOQ page except a brief mention in the
>> documentation of the old 2.4 version. I have also found
>> JOOQ-codegen-maven-example, but it's not at all obvious to me how to cull
>> knowledge from that source.
>>
>
> Please refer to this page:
>
> http://www.jooq.org/doc/3.1/manual/code-generation/codegen-configuration/#N12E2C
>
> Essentially, the jooq-codegen-maven plugin uses the same XML configuration
> format as the standalone code generator. I've added some clarification to
> the manual. A manual update will be published soon:
>
> https://github.com/jOOQ/jOOQ/commit/77a989236855a42004a4c9aa8d1a17e77d10c0df
>
>
>> 2. The generated record class uses classic JavaBeans-style getters and
>> setters. How come these are not implemented in the Fluent API style?
>>
>
> There's a pending feature request for this:
> https://github.com/jOOQ/jOOQ/issues/674
>
> I agree that fluent setters might be useful to many users. However, I
> think that returning non-void would be against the JavaBeans specification.
> This is important if jOOQ records or POJOs are used with EL in JSP or JSF
> pages, for instance.
>
> I remember having encountered setters returning "this" as not supported by
> earlier versions of Spring, although they seem to have "fixed" it in
> version 3.1 (see §3.1.9 from
> http://docs.spring.io/spring/docs/3.1.0.M2/spring-framework-reference/html/new-in-3.1.html
> )
>
> Also, an interesting discussion can be seen here:
> http://stackoverflow.com/q/5741369/521799
>
> I tend to say that it would be a bad idea to change the return type on
> generated setters. But adding a code-generation flag to modify this
> behaviour might do the trick to suit all use-cases. I have updated #674 to
> take such a flag into account:
> https://github.com/jOOQ/jOOQ/issues/674
>
> Cheers
> Lukas
>

-- 
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/groups/opt_out.


Re: Two newbie questions

2013-10-06 Thread Lukas Eder
Hello,

2013/10/5 Marko Topolnik 

> I am currently evaluating JOOQ as a candidate to use in a new project. My
> current experience amounts to reading the documentation and running code
> generation against a single table. Two questions have arisen during my
> evaluation:
>
> 1. What's happening with the Maven codegen plugin? I can't find any
> documentation on the main JOOQ page except a brief mention in the
> documentation of the old 2.4 version. I have also found
> JOOQ-codegen-maven-example, but it's not at all obvious to me how to cull
> knowledge from that source.
>

Please refer to this page:
http://www.jooq.org/doc/3.1/manual/code-generation/codegen-configuration/#N12E2C

Essentially, the jooq-codegen-maven plugin uses the same XML configuration
format as the standalone code generator. I've added some clarification to
the manual. A manual update will be published soon:
https://github.com/jOOQ/jOOQ/commit/77a989236855a42004a4c9aa8d1a17e77d10c0df


> 2. The generated record class uses classic JavaBeans-style getters and
> setters. How come these are not implemented in the Fluent API style?
>

There's a pending feature request for this:
https://github.com/jOOQ/jOOQ/issues/674

I agree that fluent setters might be useful to many users. However, I think
that returning non-void would be against the JavaBeans specification. This
is important if jOOQ records or POJOs are used with EL in JSP or JSF pages,
for instance.

I remember having encountered setters returning "this" as not supported by
earlier versions of Spring, although they seem to have "fixed" it in
version 3.1 (see §3.1.9 from
http://docs.spring.io/spring/docs/3.1.0.M2/spring-framework-reference/html/new-in-3.1.html
)

Also, an interesting discussion can be seen here:
http://stackoverflow.com/q/5741369/521799

I tend to say that it would be a bad idea to change the return type on
generated setters. But adding a code-generation flag to modify this
behaviour might do the trick to suit all use-cases. I have updated #674 to
take such a flag into account:
https://github.com/jOOQ/jOOQ/issues/674

Cheers
Lukas

-- 
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/groups/opt_out.