Hi,

i use the codegenerator to generate from a postgresDB my model and POJO 
objects..

 I have created a simple account table with id,username,password  and so i 
have an automatic generated Account POJO..
At the moment there are 3 entries in my DB with id 1 to 3

if i execute the following query : Account ac= 
createFactory().selectFrom(ACCOUNT).where(ACCOUNT.ACCOUNT_ID.equal(4)).fetchOne().into(Account.class);

 with id=4(ID 4 is not in my table) then it comes a NullPointerException, 
ist this ´normal? why ist "ac" not null ? if i do the same query with a 
AccountRecord the AccountRecord is simply null.. and i want not an 
exception i want that the object is simply null.


Second Question:

The reason why i need a POJO is that i must convert the Account Object in a 
JSON-Object.. i use the Jackson-Mapper for this.. This works with the POJO 
Objects but not with an AccountRecord..

Is there an easy way to convert a record to a JSON-Object ?

Best regards stargate

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