Unable to use userID as key while storing values in firebase
<p>I am trying to save certain values for an user in firebase DB. The only way I can make sense of the data is by using the userID as the key. Here is what I am trying to achieve</p>

<p><a href="https://firebaseDB/user_orders/userID" rel="nofollow">https://firebaseDB/user_orders/userID</a> -> List (Orders)</p>

<p>But, when I try to use user ID as the key, I am getting the error saying</p>

<blockquote>
  <p>2016-08-17 14:56:10.479 BetMe[4322:84427] *** Terminating app due to
  uncaught exception 'NSUnknownKeyException', reason:
  '[ setValue:forUndefinedKey:]:
  this class is not key value coding-compliant for the key
  3ISnq916LBdmmv7330ELByxCHV33.'</p>
</blockquote>

<p>Here is my code snippet</p>

<pre><code>let orderRef = rootRef.child("user_orders")

        orderRef.observeEventType(FIRDataEventType.Value, withBlock: { (snapshot) in
            //
            if(!snapshot.hasChild(self.currentUser.uid))
            {
                orderRef.setValue("", forKey: self.currentUser.uid)
            }

            orderRef.child(self.currentUser.uid)
        })

        orderRef.observeEventType(FIRDataEventType.Value, withBlock: { (snapshot) in
            for order in orders
            {
                //
                if(!snapshot.hasChild(order.betId)){
                    orderRef.setValue(order.dictionaryRepresentation(), forKey: order.betId)
                }

            }
        })
</code></pre>

<p>Please help me!</p>