Hello,
it seems that there is a different behaviour for the same Expression
a) executed on a database
b) executed on an exisiting DataObject.
I use MySql 4.1 and Cayenne with Manifest data:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_09-b05 (Sun Microsystems Inc.)
Built-By: andrus
Extension-Name: org.objectstyle.cayenne
Specification-Version: cayenne
Specification-Vendor: ObjectStyle.org
Implementation-Vendor-Id: org.objectstyle
Implementation-Version: 1.1.3
Implementation-Vendor: ObjectStyle.org
The scenario:
1) I need a value as criteria that identifies new ProductMedia
Date aDate = Util.getDefaultDateForNewProductMedia();
long timeLimit = aDate.getTime();
(timeLimit is in this example a long value '1128602518890' (--> 06.10.2005
14:41))
2) The value in the database of the column 'visibleFrom' is 2005-10-06
3) Dependent on greaterOrEqual value of a date column (MySql type 'date')
I get a objectList from the database.
...
Expression qualNew =
ProductMedia.getNewExpression(System.currentTimeMillis(), timeLimit);
List aNewObjectsList = ProductMedia.getProductMediaForExpression(ctxt,
qualNew);
...
...
and I get this object from db, where the visibleFrom value is '2005-10-06'
4) But If I invoke the same Expression on the DataObject, that is read
before, it returns false.
if(qualNew.match(aProductMedia)) { --> returns false
Thanks for any help...
This archive was generated by hypermail 2.0.0 : Sat Nov 05 2005 - 09:49:51 EST