New issue 36 by olaf.tie...@googlemail.com: Patch for
/trunk/gwt-mobile-webkit/database/database/src/com/google/code/gwt/database/client/service/impl/BaseDataService.java
http://code.google.com/p/gwt-mobile-webkit/issues/detail?id=36
The static field *database* should be non-static; otherwise only the handle
to the first database created is returned when using the generators.
Attachments:
BaseDataService.java.patch 485 bytes
Comment #1 on issue 36 by bguijt: Patch for
/trunk/gwt-mobile-webkit/database/database/src/com/google/code/gwt/database/client/service/impl/BaseDataService.java
http://code.google.com/p/gwt-mobile-webkit/issues/detail?id=36
Good catch, thanks!
This is a programming error, the static database field should actually be
on the generated DataService class.
Your patch solves the problem, no doubt about that, but it will create a
new reference to the same database whenever a new instance of the generated
DataService is created. When using a 'naked' Database, this could give some
problems. In other words, use only a single instance of your DataService
class - see DatabaseApi#One_Instance for details.