I’m about to start the long, arduous process of porting our desktop Java program to a web app with Vaadin. To prepare, I’ve been doing a considerable amount of reading up on Vaadin. Bear in mind, I’m still somewhat new to Java and
definitely new to Vaadin.
Our program currently retrieves data from a MS SQL Server database using standard JDBC queries and storing them in an ArrayList of beans. (Each one, in turn, stores an ArrayList of beans from a JOINed table) and then those lists populate a TreeTable. Reading about how to turn this behavior into something compatible with Vaadin, I thought SQLContainer would be the ideal method for storing the data retrieved from the database. However, one of the tables has two columns using the Data Type of “bit,” which is essentially a boolean. And I have read
here that SQLContainer does
not support
any boolean data type from a database.
Has this already been fixed since that was written, or will it ever be done in the future (if so, when)? Or should I just drop the idea of SQLContainer and use something else for my TreeTable?
I don’t see any reference to non-support of boolean in the page you linked. As far as I know, boolean data type should be supported - provided that the JDBC driver of the underlying database reports the column as a boolean column in the result set metadata. Have you actually tried this?
And, of course, I
need write support. I have not tried it yet because I am
still having trouble with getting JDBC to work like it used to. Can’t use SQLContainer until I can actually get a database connection, right?
Thank you, Adam. For some reason, I mis-read “binary” to mean “boolean.” Also, it turns out that the limitation only applies to a TableQuery, not a FreeformQuery, which is what I’ll probably be using. Thanks again!