yeah the criteria api does not support walking the association hierarchy. You have to create subcriterias yourself.
Critiera criteria =...
Type: Posts; User: lloyd.mcclendon; Keyword(s):
yeah the criteria api does not support walking the association hierarchy. You have to create subcriterias yourself.
Critiera criteria =...
Hi
Even though this is dead I'm going to reply since I just ran into the same issue, and was actually able to figure it out. The solution is to keep it all in the same method, use a callback. ...
sorry but that does not make any sense. Obviously what you have posted is not the full story. Or if it really is, whatever these tables store is not at all correct. I'd like to see an ER diagram. ...
this whole friggin problem is solved by just saying Query q = getSession().createQuery("FROM Book b ORDER BY id ASC"); q.iterate() !!!!! q.list() hangs, q.iterate() whips
no need for any of that...
ok well i found this http://www.hibernate.org/248.html
which has some good ideas but is a bit bizzare. Fortunately we are using jtds so it would work. I spent a few hours rewriting it, here is...
Hi,
I have a dataset I need to loop through, it has about 30K rows with 50 columns. For some reason .findAll() is just taking forever.
What can I do to find say the top 1000, loop, find the...
criteria api is way better than HQL
public class DAOImpl<E extends Entity<? extends Serializable>
extends HibernateDaoSupport
implements DAO<E> {
protected final Log LOG =...
right can't you just do
FROM Persons p WHERE elements(?) in elements(p.policies)
there is also the elements() thing in hql
i.e. class Store has a one to many with itemList. to find all stores selling a certain item in hql:
FROM Store s WHERE ? in elements(s.itemList)
...
public T get(final K key) {
final Class<T> entityClass = T;
return (T) getHibernateTemplate().get(entityClass, key);
}
yeah T really means nothing. are you at all familiar with what...
as for the first question, are you aware of the syntax for explicit type parameters?
exec.<LongTask> invokeAll(tasks,(long)6500, TimeUnit.MILLISECONDS);
i didn't bother to get my head around...
just store the ID, pull it every request but rely on the 2nd level cache. works fine, no trip to the DB.
i'll just share this since i haven't used it for so long. I read a good article and adapted this from it. Any questions just ask. The stdout & stderr streams are actually important to process, you...
i'm pretty sure the bean should start w/ lower case. Well actually, if I were to guess, the bean id's should mimic java field names. Which can actually start with a lower case, _, or even $. I...
Surely you can always fall back to the xml approach. The factory simply provides a more terse way of writing the config (among other advantages) at the cost of not being able to deviate from the way...
hmm maybe try
WHERE ? between '1/01/07' AND '2/01/07'
in criteria speak,
criteria.add(Expression.and(
Expression.gte(date, dateUtil.firstOfMonth(date)),
i had the same situation, most of my typing was these spring config files. What i ended up doing was writing a DAOFactory & ServiceFactory. These classes have a lot of delegate methods, which take...
http://www.ibm.com/developerworks/java/library/j-genericdao.html
@Entity
@NamedQuery(name="Book.findByName" query="FROM Book WHERE name = ?")
public class Book extends AbstractEntity<Long> {...
turn the spring logs up to DEBUG and watch those and your DB's state as you step through with the debugger.
^ i have been reading the docs here and I like this very much!! it looks like a great piece of work. i am downloading now we will see how this goes.
jira issue http://opensource.atlassian.com/projects/spring/browse/SPR-3542
i am interested to see what they say
just wrote the test, and yes it confirmed that the attribute is not inherited. i will raise a jira issue for this, we will see what happens.
ideally i think they should be inherited and...
^ well it probably should then. that could easily be fixed in the xsd. but doesn't it make sense to inherit those attributes? well i don't know. i kind of wish it did, now i have to remeber to...
Hi, this is a pretty easy yes/no question. Given the following config
<bean id="x" scope="prototype" abstract="true">
<property name="z" ref="z" />
.....
</bean>
<bean id="y"...
fyi, lazy fetching is the default for collections in hibernate 3, no need to specify that on each collection. we made the migration from xdoclet to annotations a while back. it wasn't that big of a...