是否有任何可能性为allocationSize做一种“重构”,以便将其放入perssitence.xml中,而不必在每个实体内配置它?如何在persistence.xml中配置allocationSize而不是实体
这里我不想有什么:
@SequenceGenerator(name="AGENT_IDAGENT_GENERATOR", sequenceName="AGENT_SEQ", allocationSize=1)
这里就是我期待有
<properties>
<property name="allocationSize" value="1"/>
</properties>
</persistence-unit>
感谢的提前
同意有关allocationSize = 1。但是,也许OP不能有不连续的ID?如果服务器在分配了某些ID块后崩溃,那么ID是否会出现'漏洞'?顺便说一下SessionCustomizer是什么?这是一些Eclipselink特定功能? –
是的,SessionCustomizer特定于EclipseLink,它提供对API和高级功能的访问 – James
谢谢James :-) –