![](/img/trans.png)
[英]How to access a specific element while using a List of a List of a primitive data type in Java
[英]How to limit the column length while using collection of primitive type?
@ElementCollection
@CollectionTable(name = "db_foo")
public List<String> foo;
我想添加对foo元素长度的限制(类似于@Column(length=x)
)。 可能吗?
你试过@Column(length=x)
吗? 据我了解,它也适用于这种情况。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.