diff --git a/Frameworks/PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlExpression.java b/Frameworks/PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlExpression.java index 9526a51fa05..5e24bf6d0f8 100644 --- a/Frameworks/PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlExpression.java +++ b/Frameworks/PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlExpression.java @@ -4,6 +4,7 @@ import java.lang.reflect.Method; import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.Date; import java.util.Enumeration; import com.webobjects.eoaccess.EOAttribute; @@ -508,6 +509,11 @@ else if (!"bool".equals(eoattribute.externalType().toLowerCase()) && "NSNumber". // AK: I don't really like this, but we might want to prevent infinite recursion try { Object adaptorValue = eoattribute.adaptorValueByConvertingAttributeValue(obj); + if(adaptorValue instanceof Date && !(adaptorValue instanceof NSTimestamp)) { + //Support joda classes + Date date = (Date)adaptorValue; + adaptorValue = new NSTimestamp(date); + } if(adaptorValue instanceof NSData || adaptorValue instanceof NSTimestamp || adaptorValue instanceof String || adaptorValue instanceof Number || adaptorValue instanceof Boolean) {