I have a POJO that clients of my application send me. This is used to
either INSERT or UPDATE a user. Since I had some translation to do I, maybe
not so cleverly, thought I could save some copy-and-paste by writing a
method to add values to a StoreQuery. That way I wouldn't care if it was an
INSERT or UPDATE. Unfortunately I ran into an issue with this line of my
method:
query.addValue(USERS.HOMETOWN_ID, Routines.selectHometownId(user.
getHometown()));
Both return an implementation of Field<Integer>. Unfortunately my compiler
complains that this call is ambiguous. It doesn't know if it should be
addValue(Field<T>, Object) or addValue(Field<T>, Field<T>). Here
selectHometownId is just a stored procedure to INSERT the hometown string
if it doesn't exist or SELECT it's id if it does.
Has anyone ran into this? Maybe I'm doing the wrong thing here? Even if I
cast both to (Field<Integer>) the compiler still chokes.
R.
--
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.