On Wed, 09 Jun 2010 11:18:16 -0300, Genís Pujol <gpu...@ngeografics.com>
wrote:
The database (Oracle 10g) has an index so it knows which Id to assign
next to the new record, but instead of this the new object gets Id = 0
(the next one Id=1 and so forth).
It should be the db who assigns the right Id to the new record, but I
don't know why this isn't happening...
I've tried with
@GeneratedValue(strategy = GenerationType.IDENTITY)
and
@GeneratedValue(strategy = GenerationType.AUTO)
with the same result (id=0)
Again, use Long instead of long for the id. Have you looked at the table
to see what's the id of the created line?
By the way, what you're having has nothing to do with Tapestry or Tapestry
Hibernate, it's just a Hibernate issue.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org