• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

insert does not work  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I am trying to make an insert but nothing happens in my database. This is my User class:





my mapping file:





this is my insert makePersistent() method:




Can someone help me? Any idea of what is going on?

Thanks in advance
 
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where do you begin the transaction?

Any SQL in your console output? Any error messages?




-Cameron McKenzie
 
Diego Garcia
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again,

Thanks for the response, Cameron.

Here is where i begin the transaction:



and the constructor in WebUserDAO:



and my hibernate generated sql:


Any idea? Thanks again

[ June 26, 2008: Message edited by: Diego Garcia ]

[ June 26, 2008: Message edited by: Diego Garcia ]
[ June 26, 2008: Message edited by: Diego Garcia ]
 
Diego Garcia
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I am still stuck at this...i have been reading and i have a question:

Could it be possible that i need a version element added to the mapping file (and a version instance variable)?

Any thoughts? thanks in advance.
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only if you want to use Hibernate's optimistic locking mechanism. It is optional.

Where do you commit your transaction?
[ July 08, 2008: Message edited by: Paul Sturrock ]
 
Diego Garcia
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul, for your interest.

I commit my transaction in my makePersistent() method:



[ July 08, 2008: Message edited by: Diego Garcia ]
[ July 08, 2008: Message edited by: Diego Garcia ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!