This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
What does your code look like? Are you opening a session and starting a transaction, then after you create your object are you calling saveOrUpdate() in the Session object or if using JPA calling persist(), then after that committing the transaction?
Please post your code. (Use the code button below to keep the formatting and indentation of code)
You might also want to make sure you're catching any exceptions and gathering information from them. You should be getting some feedback if your code isn't working. Do you know that the code is even being encountered?