skusil som to takto:

DetachedCriteria criteria = DetachedCriteria.forClass(A.class);
        
criteria.add(Restrictions.in("id", getIds()));
        
List result = getHibernateTemplate().findByCriteria(criteria);
        
a zase som dostal tuto chybu:

...:Object with id: 4667772 was not of the specified subclass: sk.xxxxx.A
(Discriminator: 1   ); nested exception is
org.hibernate.WrongClassException: Object with id: 4667772 was not of the
specified subclass: sk.xxxxx.A (Discriminator: 1  )

chyba sa objavi hned po vykonani findByCriteria.

Ivan


--------- Original Message --------
From: Java <[email protected]>
To: Java <[email protected]>
Subject: Re: pouzitie discriminator v Hibernate
Date: 10/06/08 18:09

> Dne Tuesday 10 of June 2008 15:58:27 Ivan Polak napsal(a):
> &gt; no praveze to nejako nefunguje: vypisuje to chybu:
> &gt;
> &gt; .....Object with id: 4667772 was not of the specified subclass:
sk.xxxx.A
> &gt; (Discriminator: 1   ); nested exception is
> &gt; org.hibernate.WrongClassException: Object with id: 4667772 was not of
the
> &gt; specified subclass: sk.xxxxx.A (Discriminator: 1   )
> 
> tak z toho nejsem 2x moudry ^^^
> 
> jinak teď jsem vyzkou&amp;scaron;el:
> 
> for (Object o : session.createCriteria(Object.class).list()) {
>     System.out.println(o.getClass().getSimpleName());
> }
> 
> a vrátilo to pěkný seznam v&amp;scaron;ech možných entit...
> 
> -- 
> Martin Beránek
> 
> 

________________________________________________
Message sent using Webmail 2.7.9

Odpovedet emailem