scala中变量前面的@符号是什么意思?
在一些文档中,我遇到了变量前面的scala中变量前面的@符号是什么意思?,scala,playframework-2.0,Scala,Playframework 2.0,在一些文档中,我遇到了变量前面的@符号。这个标志是什么意思 以下是文档中的代码: class Book(val id: Long, var title: String, @Column("AUTHOR_ID") var authorId: Long, var coAuthorId: Option[Long]) { def this() = this(0,"",0,Some(0L)) } 这意味着它是
@
符号。这个标志是什么意思
以下是文档中的代码:
class Book(val id: Long,
var title: String,
@Column("AUTHOR_ID")
var authorId: Long,
var coAuthorId: Option[Long]) {
def this() = this(0,"",0,Some(0L))
}
这意味着它是一个新的概念。在这个特定的场景中,如果您查看
键入Column=org.squeryl.annotations.ColumnBase@scala.annotation.meta.field
ColumnBase使用带有ClassfileAnnotation的批注扩展批注
这意味着它是一个新的概念。在这个特定的场景中,如果您查看
键入Column=org.squeryl.annotations.ColumnBase@scala.annotation.meta.field
ColumnBase使用带有ClassfileAnnotation的批注扩展批注
这是一种关系映射:
@Column(name="sql_column_name")
定义与字段名不同的表列名的:
这是一种关系映射:
@Column(name="sql_column_name")
定义与字段名不同的表列名的: