Re: inserting null columns

2016-02-24 Thread dollj
: inserting null columns Hi Jurgen, the reason for that behavior is that Cayenne knows nothing about the DB defaults, and insert that relies on them would end up with an object in memory whose state is different from the row in the DB. So your best bet is to use a "postAdd" callback meth

Re: inserting null columns

2016-02-24 Thread Andrus Adamchik
Hi Jurgen, the reason for that behavior is that Cayenne knows nothing about the DB defaults, and insert that relies on them would end up with an object in memory whose state is different from the row in the DB. So your best bet is to use a "postAdd" callback method to init the defaults on the J

inserting null columns

2016-02-22 Thread dollj
Hi All I've notice that when Cayenne 3.1 constructs a SQL insert statement, that it includes all null valued columns as well. Is there a way to prevent this from happening because in MS SQL it prevents default column constraint values from being applied. I've tried creating an entity without