Oops. I opted for minor change... so maybe there wont be a notification ;-)

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Matt Raible
Gesendet: Samstag, 2. Juni 2007 06:36
An: [email protected]
Betreff: Re: [appfuse-user] PersonDaoTest fails

Yes, please do. I get notifications of changes (you can sign up for
these too) so I'll review your changes.

Matt

On 6/1/07, René Günther <[EMAIL PROTECTED]> wrote:
> This solved my issue. I updated the wiki if that is Ok
>
> Thanks
> René
>
> -----Ursprüngliche Nachricht-----
> Von: Arvinder Brar [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 1. Juni 2007 21:53
> An: [email protected]
> Betreff: Re: [appfuse-user] PersonDaoTest fails
>
> Try replacing
>
> personDao.save(person);
>
> with
>
> person=personDao.save(person);
>
> if you are using M5
> --- Matt Raible <[EMAIL PROTECTED]> wrote:
>
> > What does your person class look like? Can you post
> > your whole test method?
> >
> > On 6/1/07, René Günther <[EMAIL PROTECTED]>
> > wrote:
> > > Hello,
> > >
> > > my PersonDaoTest fails:
> > >
> > > Tests run: 2, Failures: 0, Errors: 1, Skipped: 0,
> > Time elapsed: 2.047 sec
> > > <<< FAILURE!
> > >
> >
> testAddAndRemovePerson(com.innflow.rapport.dao.PersonDaoTest)
> >  Time elapsed:
> > > 0.062 sec  <<< ERROR!
> > > java.lang.IllegalArgumentException: id to load is
> > required for loading
> > >         at
> >
> org.hibernate.event.LoadEvent.<init>(LoadEvent.java:51)
> > >         at
> >
> org.hibernate.event.LoadEvent.<init>(LoadEvent.java:33)
> > >         at
> >
> org.hibernate.impl.SessionImpl.get(SessionImpl.java:812)
> > >         at
> >
> org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
> > >         at
> > >
> >
> org.springframework.orm.hibernate3.HibernateTemplate$1.doInHibernate(Hiberna
> > > teTemplate.java:470)
> > >         at
> > >
> >
> org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTempla
> > > te.java:372)
> > >         at
> > >
> >
> org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.j
> > > ava:464)
> > >         at
> > >
> >
> org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.j
> > > ava:458)
> > >         at
> > >
> >
> org.appfuse.dao.hibernate.GenericDaoHibernate.get(GenericDaoHibernate.java:4
> > > 2)
> > >         at
> > >
> >
> com.innflow.rapport.dao.PersonDaoTest.testAddAndRemovePerson(PersonDaoTest.j
> > > ava:43)
> > >         at
> > >
> >
> com.innflow.rapport.dao.PersonDaoTest.testAddAndRemovePerson(PersonDaoTest.j
> > > ava:43)
> > >
> > > My code is:
> > >
> > > personDao.save(person);
> > > flush();
> > > person = personDao.get(person.getId());
> > > -> here the exception is thrown.
> > >
> > > So I tried
> > > person = personDao.get(new Long(2));
> > >
> > > and everything works fine. What should I try to
> > get person.getId() to work?
> > >
> > > René
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > http://raibledesigns.com
> >
>
>
>
> Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel
> and lay it on us.
> http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to