LongKeyedMapper object where I can set the id.

I want a database object where I set the primary key myself (rather
than having it be sequentially by the database).  I thought I could do
this:

class Tombstone extends LongKeyedMapper[Tombstone] {
  def getSingleton = Tombstone

  def primaryKeyField = id
  object id extends MappedLongIndex(this) {
    override def writePermission_? = true
  }
}

object Tombstone extends Tombstone with LongKeyedMetaMapper[Tombstone]
{
  override def dbTableName = "tombstones"
}

But when I do Tombstone.create.id(12).save it does an UPDATE instead
of an INSERT.  Is there any good way to do what I want here?
--~--~---------~--~----~------------~-------~--~----~
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