|
The <hib:saveOrUpdate> tag wraps the
Session.saveOrUpdate() method. This will either save() or update() the
given instance, depending upon the value of its identifier property.
The <hib:saveOrUpdate> tag's attributes are as follows:
| Attribute |
Description |
Required |
Default |
target |
Name of the variable who should be saved or updated to the database |
Yes |
None |
sessionFactory |
Session factory to use (overrides the default) |
No |
Default session factory |
Examples
Example 3 - Create a new cat
|