db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucas MORENO ENCABO <lucas.mor...@st.com>
Subject Update behavor
Date Thu, 08 Mar 2007 10:25:30 GMT
Hi

I was just thinking about the default update behavor implemented in PlatformImplBase.java

Creating a BynaBean for a Table and setting some values (not all values defined in the column
model) causes the update method to prepare a SQL Update query with all the columns of the
table. As in the bean we have not specified a value for every column, when the update is executed
the values not defined are set to NULL.

Should this be the default update behavor?

As I see, the update method should:

- Check that all the primary keys are defined in the bean
- Prepare a SQL Update query only with the values specified in the bean
- Execute the update

At the moment, the only way of not reseting everything to NULL is SELECT the desired Bean,
update the bean properties and execute the update of the platform.

What do you think?

Lucas MORENO


Mime
View raw message