Hello,

Thanks again for reporting this. This issue was due to bad regular
expression parsing of MySQL's mysql.proc.param_list contents. In fact, only
upper-cased IN, OUT, INOUT keywords are recognised as of jOOQ 3.0. The
quickest workaround for you is to upper-case these keywords in your
database. The fix can be seen here:
https://github.com/jOOQ/jOOQ/commit/48a3f2bd2ab03b65797ff8335f5ff544caabb3ef

jOOQ 3.1 will contain a fix for this issue, which will be merged to older
releases, such as 3.0.2, 2.7.0, 2.6.5.

In the long run, however, jOOQ should really use the
INFORMATION_SCHEMA.PARAMETERS dictionary view, if it is available:
https://github.com/jOOQ/jOOQ/issues/742

Cheers
Lukas


2013/4/23 Lukas Eder <[email protected]>

> 2013/4/22  <[email protected]>:
> > I have a stored procedure in MySQL version 5.1.65 running on Mac Os X,
> which
> > is declared like so:
> >
> > CREATE DEFINER=`root`@`localhost` PROCEDURE
> > `sendregning`.`balance_per_claim_type`(in p_originator_id integer,
> > p_recipient_id integer,
> >     out p_bal decimal(12,2), out p_pos decimal(12,2), out p_neg
> > decimal(12,2), out p_uid decimal(12,2) )
> >     READS SQL DATA
> >
> > As you can see, I have 4 variables declared with "out".
> >
> > The generated Java code from jOOQ version 3.0.0-RC3 looks like this:
> >
> > public static void balancePerClaimType(org.jooq.Configuration
> configuration,
> > java.lang.Object in, java.lang.Integer pRecipientId, java.lang.Object
> out,
> > java.lang.Object out, java.lang.Object out, java.lang.Object out) {
> >
> > As you can see, this will not compile the generated code should produce
> > unique identifiers, that is; either each output object should be named
> > according to the SQL declaration (p_bal, p_pos etc.) or each parameter
> > should have been named out1, out2 ... outn.
> >
> > Seems like a possible bug in the code generator to me.
>
> Yes, this looks like a bug to me. I've registered #2412 for this:
> https://github.com/jOOQ/jOOQ/issues/2412
>
> Unfortunately, to stay backwards-compatible with earlier versions of
> MySQL, jOOQ's code generator cannot read the
> INFORMATION_SCHEMA.PARAMETERS dictionary view. Instead, jOOQ parses
> PROC.PARAM_LIST as can be seen here:
>
> https://github.com/jOOQ/jOOQ/blob/master/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLRoutineDefinition.java
>
> I'm sure there is room for improvement in the current implementation,
> though...
>

-- 
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.


Reply via email to