Example #1
0
        public override String ToSqlString(Serializer.Serializer serializer, Type type, String target)
        {
            AttributeWorker w = AttributeWorker.GetInstance(target);

            IList <Type> path = w.ComputeVirtualKeyPath(serializer, _type, type); //ComputePath(type, _type, target);

            return(ComputeSqlJoin(serializer, path, _sqlString, target).ToString());
        }
Example #2
0
        public override String ToSqlString(Serializer.Serializer serializer, Type type, String target)
        {
            AttributeWorker w    = AttributeWorker.GetInstance(target);
            IList <Type>    path = w.ComputeVirtualKeyPath(serializer, _type, type); //ComputePath(_type, type, target);

            StringBuilder b = new StringBuilder();
            FieldInfo     f = w.RetrieveField(_type, _field, false);

            if (f == null)
            {
                throw new RestrictionException("Field '" + _field + "' not found in '" + _type.ToString() + "'");
            }
            b.Append(w.GetColumnMapping(f));
            b.Append(_comparer).Append(SqlUtil.SqlConvert(_value));

            String tmp = ComputeSqlJoin(serializer, path, b.ToString(), target).ToString();

            return(tmp);
        }