 public func !=<T>(left: Attribute<T>, right: T) -> NSComparisonPredicate {
     return NSComparisonPredicate(
         leftExpression: left.expression,
-        rightExpression: left.expressionForValue(right),
+        rightExpression: expressionForValue(right),
         modifier: .DirectPredicateModifier,
         type: .NotEqualToPredicateOperatorType,
         options: left.comparisonPredicateOptions()

}

public func <<<T>(left: Attribute<T>, right: Range<T>) -> NSComparisonPredicate {
    let rightValue = [right.startIndex as! AnyObject, right.endIndex as! AnyObject] as NSArray
    let rightExpression = NSExpression(forConstantValue: rightValue)
    
    return NSComparisonPredicate(

        return NSExpression(forKeyPath: self.___name)
    }
    
    private func comparisonPredicateOptions() -> NSComparisonPredicateOptions {
        if T.self is String.Type || T.self is String?.Type || T.self is NSString.Type || T.self is NSString?.Type {
            return ContextOptions.stringComparisonPredicateOptions
