Hi there,

I'm sorry for the delay. I've been presenting jOOQ at the Topconf in
Tallinn, so a couple of E-Mails have been piling up.

I'll create a new thread for this discussion, as it is hard for future
visitors to follow this thread, if topics are mixed.

About your question:

I hadn't thought about this possibility, so far. While I agree that it
would be useful to add overloaded update() methods:

- update(User)
- update(IUser)

It might not make sense to change the generic <P> type of the DAO to be the
interface, as the return type e.g. on fetchOne()
(http://www.jooq.org/javadoc/latest/org/jooq/DAO.html#fetchOne(org.jooq.Field,
Z)) should remain the POJO itself.

I will need to think about this, as there are a couple of caveats related
to API consistency, if this is added:
https://github.com/jOOQ/jOOQ/issues/2834

Cheers
Lukas

2013/11/5 <[email protected]>

> Hi Lukas,
>
> I use :
>
> ------------------------
>
>
> *<pojos>true</pojos><interfaces>true</interfaces><daos>true</daos>*
> ------------------------
>
> I see that the generated DAOs use the pojos *implementations* as the
> types they deal with, instead of the associated *interfaces*.
>
> For example, this is generated :
>
> *userDao#update(User);*
>
> not
>
> *userDao#update(IUser);*
>
>
> So if I play with *IUser *implementing objects and I want to use their
> associated DAOs, I have to convert them to *User *first by myself, right?
> Is there a reason for that?
>
> Since the *User *pojo already contains a *from(IUser)* method, I guess
> Jooq could do the convertion by itself?
>
> Thanks in advance!
>
>
>  --
> 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.

Reply via email to