views:

38

answers:

2

I'm writing a Google Wave robot and I just messed something up. It was working just fine but now I'm getting an IllegalArgument exception on the line that includes query.execute.

Am I doing something stupid? I've seen several code samples very similar to what I'm doing. I can include the code of the WaveUpdate class if necessary.

The intent here is to select all WaveUpdate members that have an updateDateTime in the last hour.

    PersistenceManager pm = PMF.get().getPersistenceManager();
    try
    {
        Query query = pm.newQuery(WaveUpdate.class);
        query.setFilter("emailAddress > '' && updateDateTime > referenceDateTime");
        query.declareParameters("java.util.Date referenceDateTime");
        Calendar referenceDateTime = Calendar.getInstance();
        referenceDateTime.add(Calendar.HOUR_OF_DAY, -1);
        List<WaveUpdate> updates = (List<WaveUpdate>) query.execute(referenceDateTime.getTime());
A: 

I don't know what changed, but your IDE might have the working version in its local history.

trashgod
A: 

I found the problem - you can't use two inequalities in the same query. Duh.

Yoenhofen