From: David L. <dle...@co...> - 2009-06-18 14:08:50
|
On 18-Jun-09, at 5:41 AM, Mark Jackson wrote: > Hi all, > > I'm just putting together a ERD2W App, and came up against the > following 'funny' on an Edit page : > > The Entity being edited has a mandatory Attribute, which is modelled > as follows (DB = MySQL) > > columnName : 'maxNumberOfWidgets' > name : 'maxNumberOfWidgets' > prototypeName : 'intNumber' > > However, the following default rule for the componentName gets fired > > 10 : ((task = 'edit') and (session.javaScriptEnabled <> > (java.math.BigDecimal)'1') and ((smartAttribute.className = > 'com.webobjects.foundation.NSTimestamp') or > (smartAttribute.allowsNull = (java.math.BigDecimal)'0'))) => > componentName = ERDEditDatePopup > > From: ERDirectToWeb.framework/Resources > > This immediately causes a ClassCastException, since, of course, the > ERDEditDatePopup expects an NSTimestamp. > > It seems that because the Attribute doesn't allow null, the " or > (smartAttribute.allowsNull = (java.math.BigDecimal)'0'))" clause > fires the rule. > > Of course, I can add my own overriding rule to correct this, but I > had expected the default rules to work 'out of the box'. > > Wonder Version is from 17th June. Mark, Not sure what the original intention of that clause is, but I have a feeling that the 'or' should be an 'and'. I'd file a bug in Jira. ;david -- David LeBer Codeferous Software 'co-def-er-ous' adj. Literally 'code-bearing' site: http://codeferous.com blog: http://davidleber.net profile: http://www.linkedin.com/in/davidleber twitter: http://twitter.com/rebeld -- Toronto Area Cocoa / WebObjects developers group: http://tacow.org |