SqlContainer addItem not working


I am trying to use the addItem() for sqlcontainer with a postgres db . When I try to add an Item to container I get the " Returning autogenerated keys is not supported error" . I have tried with the postgres jdbc postgresql-8.2-507.jdbc4 driver but it still gives the error

Please help


A coworker of mine checked the jdbc driver and it should be ok. Is there any way you can try with Postgres 9.X instead of 8.X? Also, if you post the exact version of Vaadin you were using then I can show the SqlContainer source to my PG expert here.


I am having the same problem??? I resolved it by casting the SQLContainer to Container and then you can use the .addItem method.

The item is actually a RowID type.

Container c= (Container)sqlContainer;
RowId ri = (RowId)c.addItem;