I don't undertand. Could you give me an example?
Thanks. ----- Original Message ----- From: mraible [via AppFuse] To: Juan Antonio Sent: Wednesday, May 19, 2010 5:50 PM Subject: Re: Trying to save some data in database when login I would try adding a super.flush() after you persist the data. On Wed, May 19, 2010 at 9:44 AM, Juan Antonio <[hidden email]> wrote: > > I am experience a problem with a query. > > Previous to save data to database, i try to find if there is already data > related to the user: > > The final query, in UserDataDao.java is this: > > public UserData findByIdClient(long userId) throws NoSuchUserDataException { > List<UserData> usersData = getHibernateTemplate().find("from UserData ud > where ud.userId = ?", userId); > if ((usersData == null) || usersData.isEmpty()) { > log.error("No existen datos del usuario con userId " + userId); > throw new NoSuchUserDataException("No existen datos del usuario con userId > " + userId); > } > return usersData.get(0); > } > And it always return that the list is empty, even when there is data stored > in the database, associated with the user, and overwrite the record. > > I followed the tutorial. What I am doing wrong? I am trying to access with > the default admin -2. and the access to the database i am doing it from the > listener, but if it can write the data, it must read it. I don't know :( > > Cheers. > -- > View this message in context: http://appfuse.547863.n4.nabble.com/Trying-to-save-some-data-in-database-when-login-tp2022951p2223057.html > Sent from the AppFuse - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] ------------------------------------------------------------------------------ View message @ http://appfuse.547863.n4.nabble.com/Trying-to-save-some-data-in-database-when-login-tp2022951p2223068.html To unsubscribe from Re: Trying to save some data in database when login, click here. -- View this message in context: http://appfuse.547863.n4.nabble.com/Trying-to-save-some-data-in-database-when-login-tp2022951p2223176.html Sent from the AppFuse - User mailing list archive at Nabble.com.