@Naros
Here is some sample code
Main entityCode:
@Entity
@Audited(withModifiedFlag = true)
@Table(name = "main_entiity")
@SequenceGenerator(name = "gen_main_entity_id", sequenceName = "seq_main_entity_id", allocationSize = 1, initalValue = 1)
public class MainEntity implements Serializable{
@Id
@GeneratedValue(generator = "gen_main_entity_id", strategy = GenerationType.AUTO)
private Integer id;
@Column(name = "owner_name")
private String ownerName;
@Column(name = "owner_address")
private String ownerAddress;
/*some other fields*/
@Embedded
private EmbeddedEntity embeddedEntity;
/*Getters, Setters, */
}
Embedded entityCode:
@Embeddable
public class EmbeddedEntity implements Serializable {
@Column(name = "embedded_name")
private String embeddedString;
/*some other fields*/
/*Getters, Setters, */
}
And if i tried to change only embeddedString field in embeddedString_MOD column in DB i have 0.
If i tried to chsnge any field, which is in MainEntity class - i have correct values in _MOD columns in DB.