[codenameone-discussions] Re: Deal with null value in sqlite database

2016-09-01 Thread Shai Almog
Steve will have to help with that as I'm not familiar with that code. -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr

[codenameone-discussions] Re: Deal with null value in sqlite database

2016-09-01 Thread Jérémy MARQUER
You're right ! In fact, I think the problem is in cn1-data-lib-access. As object array is construct, it can't receive NULL value since all object are converted to String. For example, for insertion : /** * Gets generic insert args for insert statement for the given map of row data. * * @param m

[codenameone-discussions] Re: Deal with null value in sqlite database

2016-08-31 Thread Shai Almog
The main issue is old fallback code. The iOS implementation is native so the sqlite layer has no notion of "object". Notice that in the string conversion "null" is preserved as null so it should work correctly: if (params[i] == null) { strParams[i] = null;

[codenameone-discussions] Re: Deal with null value in sqlite database

2016-08-31 Thread Jérémy MARQUER
I come back to this topic which is very problematic for me. The manner which I use permit me to read/save null values in database. But in fact, it's "null" string values that are stored in db. So, there is no constraint validation possible with that. Even worse, foreign key constraint can faile

[codenameone-discussions] Re: Deal with null value in sqlite database

2016-05-30 Thread Jérémy MARQUER
Hi, FYI Shannah, I modified DAO.java in your framework like : /** * Fills a map with the data of the current row of database Cursor * * @param c *The database cursor from a query. * @param m *The map to fill. * @throws IOException */ protected void fillMap(Cursor c, Map

[codenameone-discussions] Re: Deal with null value in sqlite database

2016-05-26 Thread Jérémy MARQUER
Ok I've misunderstood ! Problem is I've no control on this code since it's included in shannah's plugin (cn1-lib-access). Whatever, I will bypass my problem differently. -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscri

[codenameone-discussions] Re: Deal with null value in sqlite database

2016-05-25 Thread Shai Almog
What I was trying to say is this: Use your number code as before without a problem. However, when you need to check if a value is null use the getString() method to check that special case. -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" g

[codenameone-discussions] Re: Deal with null value in sqlite database

2016-05-25 Thread Jérémy MARQUER
Thanks for both your responses. Sure I know I can save null values with custom queries. In fact, my code is already adapted to invoke framework's method (eg : update/save/find), so I don't use custom query (and prefer don't use it). When I initialize my database, Integer/Long column contains NU