Home >Database >Mysql Tutorial >Oracle入门教程:ADF 中使用Sequence的方法总结

Oracle入门教程:ADF 中使用Sequence的方法总结

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:06:401053browse

1,在EO的属性中使用Groovy 优:简单直接 缺:断号 (new Oracle.jbo.server.SequenceImpl(XXXX_SEQ,adf.object.getDBTransac

1,在EO的属性中使用Groovy

优:简单直接

缺:断号

  • (new Oracle.jbo.server.SequenceImpl("XXXX_SEQ",adf.object.getDBTransaction())).getSequenceNumber()  
  • 2,在EO对应的java类的create方法中对属性赋值

    优:可以产生复杂的Sequence值

    缺:断号

    3,使用DBSequence类型

    在数据库端创建Trigger给表的字段赋值,在EO中将该字段的类型设置为DBSequence。
    优:避免断号

    缺:界面中显示的值与最终commit保存到数据库中的值不同。

    linux

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn