Hi all,

I'm using Mapper with MAC addresses as my primary keys:
class Node extends KeyedMapper[String, Node] {
 def getSingleton = Node
 /* MAC address as primary key */
 def primaryKeyField = mac
 object mac extends MappedStringIndex(this, 17) {
         override def dbPrimaryKey_? = true
         override def dbDisplay_? = true
 }
}

Unfortunately, if I try to create a new Node and assign a MAC address,
I get an error saying that I don't have permission:
scala> Node.create.mac("00:1d:c9:00:04:9f")
java.lang.Exception: Do not have permissions to set this field
        at net.liftweb.mapper.MappedField$class.set(MappedField.scala:425)
        at net.liftweb.mapper.MappedString.set(MappedString.scala:38)
        at net.liftweb.mapper.MappedString$$anonfun$apply$6.apply
(MappedString.scala:121)
        at net.liftweb.mapper.MappedString$$anonfun$apply$6.apply
(MappedString.scala:121)
        at net.liftweb.util.Full.f...

How do I go about creating a new Node with the mac address – the
primary key – of my choosing?

Thanks,
Peter Robinett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to