我的应用程序在本地和专用服务器环境中都有一个完美的运行版本。
我现在正在单独通过云托管服务,但遇到了一个奇怪的错误,我非常感谢一些帮助。
有问题的错误是由为此模型创建的新记录引起的:
class Panel_Model private() extends MongoRecord[Panel_Model] with ObjectIdPk[Panel_Model] {
def meta = Panel_Model
object dbid extends LongField(this)
object handle extends StringField(this, 50)
object room extends StringField(this, 50)
object user extends StringField(this, 50)
object name extends StringField(this, 50)
object element extends StringField(this, 50)
object slide extends MongoJsonObjectListField(this, Panel_Model_Slide)
object state extends JsonObjectField(this, Panel_Model_State) {
def defaultValue = null.asInstanceOf[Panel_Model_State]
}
object time extends JsonObjectField(this, Panel_Model_Time) {
def defaultValue = null.asInstanceOf[Panel_Model_Time]
}
}
object Panel_Model extends Panel_Model with MongoMetaRecord[Panel_Model] {
override def collectionName = "panels"
}
case class Panel_Model_Slide (
handle: String,
media: String,
param: Map[String, String],
content: String,
view: String,
index: Int,
active: Int
) extends JsonObject[Panel_Model_Slide] {
def meta = Panel_Model_Slide
}
object Panel_Model_Slide extends JsonObjectMeta[Panel_Model_Slide]
case class Panel_Model_State (
ready: Int,
active: Int,
locked: Int,
slide: Map[String, Int]
) extends JsonObject[Panel_Model_State] {
def meta = Panel_Model_State
}
object Panel_Model_State extends JsonObjectMeta[Panel_Model_State]
case class Panel_Model_Time (
created: Long
) extends JsonObject[Panel_Model_Time] {
def meta = Panel_Model_Time
}
object Panel_Model_Time extends JsonObjectMeta[Panel_Model_Time]
产生错误的实际调用,仅在 cloudbees 环境中是这样的:
Panel_Model.createRecord.
dbid(dbid).
room(Room_Session.is).
user(User_Session.is).
name(fph.fileName).
handle(handle).
element(element).
state(Panel_Model_State(
0, active, 0, Map(
("active" -> 1),
("total" -> 1)
)
)).
time(Panel_Model_Time(unix)).
save
非常感谢任何帮助,在此先感谢