Ricardo Kustner wrote: > I'm having some (minor) problems converting an old mmbase site to 1.7.3: > the constraints attribute in <mm:list> doesn't seem to be really downwards > compatible. > > I have a list which looks like this: > <mm:list ... constraints="i_pos.pos % 3 = 1"> > > This works fine in mmbase <1.7 but 1.7 gives me this error: > 2005-03-30 15:29:17,263 SERVICE search.legacy.ConstraintParser.fallback - > Failed to parse Constraint from search condition string: > sqlConstraint = i_pos.pos % 3 = 0 > exception: java.lang.IllegalArgumentException: Unexpected token: > "%"java.lang.IllegalArgumentException: Unexpected token: "%" > > I even tried to use MOD(i_pos.pos, 3) = 1, but that doesn't work either... > even though the examples in the docs claim you can use sql functions, I > have the feeling that anything which isn't a simple combination of fields > doesn't work. > > any ideas if this should be a bug or is it the way it is intended ?
It is fall-back behaviour, which give this mess in the log. It is only a SERVICE (so not WARN or ERROR). Can you tell me if it does not work, because from this log-entry I would gather that it might work after all. If the log-entries are to irritating, simply set the logging of ConstraintParser to INFO, in that case. I think the modulo-operator is not supported by the query-framework, and therefor not by the ConstraintParser as well. It seems a valid wish though, because it is quite a normal operator. Michiel -- Michiel Meeuwissen mihxil' Mediacentrum 140 H'sum [] () +31 (0)35 6772979 nl_NL eo_XX en_US _______________________________________________ Developers mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/developers
