Hmmm, your question makes me realize my head isn't completely wrapped around the Hibernate paradigm yet.
I was thinking along the lines that all I want to do is add a new row to the database and be done with it. In this particular case, I probably won't refer back to the row I just added for quite awhile. If I was doing this the old JDBC way, it would be a simple SQL insert statment and I would not specify a value for the ID column.
But I'm now guessing Hibernate can't do that because it wants to associated my persistant java bean with the row I just added to the DB. And to do that, it needs to set the bean with the ID of row just added. Doing that with a sequence requires two queries.
Do I have any of that right?
|