Browse by Tags

All Tags » Object Relational Mapping (RSS)

Getting a generated key without commiting transaction in JPA by lamia

Assuming you have set a generated value of any type to your entity and that it is mapped to an auto-increment field, you can get the generated key in JPA. Before, I try to commit the transaction just to get a generated key. EntityManager em = getEntityManager...

My Hibernate Early Error Encounters by lamia

Ok, I almost gave up at my early attempt in learning Hibernate. I encountered the following errors QuerySyntaxException - I accidentally mistook the table name to the class name. List messages = newSession.createQuery("from TABLE m order by m.text asc...

Studying Hibernate by lamia

Before I started reading about hibernate, I had a hard time which technology to learn first. ORM or Webservices? As they are both essential technologies, I am left with such confusion. I already read some introductory articles about webservices, mainly...