Wow that was a fast response, thanks Lukas.

I've made the code change you suggested and it's working perfectly.

This is a great library. I've used JPA commercially for a couple of years 
(Toplink mostly), and burned countless hours getting it to behave, often 
just with basic CRUD stuff.

After an hour or two of using jOOQ I prefer it immensely, and I think 
you've hit the perfect balance with the design. I much prefer starting with 
my own database schema and generating the classes from it. It also has a 
short and shallow learning curve. Aside from the problem I posted, I am 
already able to to everything I need to do.

Keep up the good work!


On Saturday, 30 June 2012 18:10:49 UTC+10, Lukas Eder wrote:
>
> Hi James, 
>
> > I'm attempting to read a row, set a field value and store it back. I 
> want to 
> > be able to use the generated getters and setters rather than getValue, 
> so 
> > I'm fetching into the generated class like so: 
> > 
> > return factory.select() 
> >                     .from(USERS) 
> >                     
> .where(USERS.EMAILADDRESS.equalIgnoreCase(emailAddress)) 
> >                     .fetch().into(USERS); 
>
> The simplest way for you to do so is by replacing the above by 
>
> return factory.selectFrom(USERS) 
>                     
> .where(USERS.EMAILADDRESS.equalIgnoreCase(emailAddress)) 
>                     .fetch(); 
>
> The selectFrom() method takes care of correctly initialising records 
> in a way that a subsequent store() will execute an UPDATE. I'll 
> investigate why into() doesn't take care of that correctly. Looks like 
> a bug. This will be tracked as #1522: 
> https://sourceforge.net/apps/trac/jooq/ticket/1522 
>
> Cheers 
> Lukas 
>

Reply via email to