The main screen show to the user some fields to fill info:
NR_PROTOCOLO (from TB_REQUERIMENTO) NOME (from TB_PESSOA) DT_NASCIMENTO (from TB_PESSOA)
and a dynamic list where new lines can be added/removed to fill former names for that person: NOME (from TB_PESSOA_NOME_ANTERIOR)
The problem occurs when I load a record from TB_REQUERIMENTO and edit it only by adding or removing a former name from TB_PESSOA_NOME_ANTERIOR . When I try to save the change, hibernate generates the following instruction:
update TB_PERSON set where ID=? and VERSAO=?
As you can see, "set" clause shows nothing, since no field from TB_PESSOA was changed, but only one of its children.
Since VERSAO is updated by a database trigger, it is not listed on SET clause. In such a situation, I think hibernate could either use any column at his choice or use an annotated column (new annotation for this purpose). |
|