Thanks for the update. Apart from the obvious typo (marked yellow), I don't see anything wrong with that query, but I don't see anything wrong with the SQL generated by jOOQ either.
What happens if you run the generated query in SQL Workbench, for instance? Just to be sure, the column is really called Email1, not email1, or email_1 or something? If that doesn't help, are you able to extract this case in a minimal reproduceable test case? Best Regards, Lukas 2017-07-05 10:04 GMT+02:00 <[email protected]>: > Hello, > > Syncing my DB and jOOQ was the first thing I checked when debugging this. > And yes the column IS in the database. > > Correct I did a SELECT(*) as I want to load all the info from the database > into my objects. > > The exception is thrown at .fetch(). > > This is my query: > > List<OfficeSpace> spaces = db.select(*).from(OFFICESPACES) > .where(OFFICESPACES.LATITUDE > .between(nw.getLatitude()) > .and(se.getLatitude()) > ) > .and(OFFICESPACES.LONGITUDE > .between(nw.getLongitude()) > .and(se.getLongitude())) > .fetch() > .into(OfficeSpace.class); > > Many thanks, > > On Tuesday, July 4, 2017 at 4:54:35 PM UTC+1, Lukas Eder wrote: >> >> Hello >> >> 2017-07-04 17:48 GMT+02:00 <[email protected]>: >>> >>> Surely this is a bug. >>> >> >> Yes, quite likely. In your code :-) >> >> I'm guessing that you're using the DSLContext.selectFrom() API to select >> *all* the columns from your OfficeSpaces table. jOOQ never generates a >> SELECT * query, unless the columns are unknown (e.g. in the presence of >> plain SQL). So, if you modify your database schema, e.g. by dropping the >> Email1 column, or renaming it, and you do not re-generate your tables with >> the jOOQ code generator, jOOQ will still select that column from your >> database. >> >> If that doesn't explain it and you still think there's a bug in jOOQ, >> would you mind posting your jOOQ query as well? >> >> I hope this helps, >> Lukas >> > -- > 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. > -- 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.
