1
바이트 배열이 재생 프레임 워크 모델의 일부인 것에 대해 질문하고 싶습니다. 내 모델은 다음과 같이 정의된다 :배열 [Byte] in Play Framework 모델
: DAO 객체와@Entity
class BTFile (
@Required
var hash : Array[Byte],
@Required
var size : Int
) extends Model {
@OneToMany(mappedBy="file",cascade=Array(CascadeType.ALL))
var peers:JList[BTPeer] = new ArrayList[BTPeer]
}
이
object BTFiles extends QueryOn[BTFile]
하지만 BTFiles.find ("byHash")를 사용하려고 할 때마다 정의, 그것은 예외 다음 던졌습니다
[B cannot be cast to [Ljava.lang.Object;
누구든지이 문제를 해결하는 방법을 알고 있습니까? 나는 그것을 위로 google에 시도했다. 그러나 나는 어떤 해결도 발견하지 않았다. 단위 테스트는 다음에서 테스트합니다 :
it should "create and retrieve BTFile" in {
val file = new BTFile("some_hash".getBytes,1).save
BTFiles.find("byHash","some_hash".getBytes)
}
아무 도움이됩니다.
스택 추적을 추가 할 수 있습니까? –