Let's say you had a table like this
/------------
| id | name |
|------------|
| 1 | foo |
| 2 | bar |
-----------
There is a uniqueness constraint on the 'name' column.
How would you set #2's name to foo, and #1's name to bar?
I know you could probably just assign temporary names to both then stick in the desired names, but that does not seem like the simplest way.
I am using Hibernate, so any Hibernate-specific tricks would be nice. This seems like a problem that affects all RDBMSes in general though.