Hi,

I'm trying to use jOOQ from Ceylon, so far it's been working quite well, 
except for identities. I used custom data types to substitute Java types 
with Ceylon types (e.g. int values will be mapped to ceylon.language.Integer 
instead of java.lang.Integer). The only problem I found is that in the 
generated code, getIdentity() forces me to use a type that extends 
java.lang.Number, which is not the case for ceylon.language.Integer.

I removed the getIdentity() overrides in each generated class, and it 
worked until I tried to insert a record and retrieve a generated MySQL PK 
using returning(): if getIdentity() is not overridden, null is returned 
instead of the expected generated value.

So, my question is: since jOOQ allows me to use virtually any custom data 
type I want, why do I *have to* use something that extends Number for 
identities? The only usage I found is in 
org.jooq.impl.AbstractDMLQuery.selectReturning(Configuration, 
Object...), but AFAICT this code is only setting values that are not 
necessarily Numbers, so it seems identities could be simplified to Identity<R, 
?> instead of Identity<R, ? extends Number>.

What do you think?

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

Reply via email to