Hello List,


i've some trouble with updating POJOs. Inserting POJOs with DAO works like 
a charm. E.g.:


Users users = new Users();

users.setName(name);

...

dao.insert(users);


but if i want to Update an existing record then an excepiton is thrown...



org.jooq.exception.DataAccessException: SQL [update `users` set 
`users`.`name` = ?, `users`.`private_key` = ?, `users`.`public_key` = ? 
where `users`.`id` = ?]; [SQLITE_ERROR] SQL error or missing database (near 
".": syntax error)

at org.jooq.impl.Utils.translate(Utils.java:1690)

at 
org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:660)

at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:356)

at 
org.jooq.impl.UpdatableRecordImpl.storeUpdate0(UpdatableRecordImpl.java:240)

at org.jooq.impl.UpdatableRecordImpl.access$100(UpdatableRecordImpl.java:85)

at org.jooq.impl.UpdatableRecordImpl$2.operate(UpdatableRecordImpl.java:199)

at org.jooq.impl.RecordDelegate.operate(RecordDelegate.java:128)

at 
org.jooq.impl.UpdatableRecordImpl.storeUpdate(UpdatableRecordImpl.java:195)

at org.jooq.impl.UpdatableRecordImpl.update(UpdatableRecordImpl.java:150)

at org.jooq.impl.UpdatableRecordImpl.update(UpdatableRecordImpl.java:145)

at org.jooq.impl.DAOImpl.update(DAOImpl.java:188)

at org.jooq.impl.DAOImpl.update(DAOImpl.java:167)

at 

...


using this code


Users user = dao.fetchByName(name).get(0);

user.setPrivateKey(privateKey);

dao.update(user);


Any hints whats wrong?


I am using SQLite 3.8.11.2 and Jooq 3.7.1


Cheers

MrPeacock

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