`
梅花灿
  • 浏览: 5817 次
  • 性别: Icon_minigender_1
  • 来自: 广州
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

The database returned no natively generated identity value的解决方案

 
阅读更多

在POJO的映射文件中配置如下:

<hibernate-mapping package="com.lpc.hibernate"> <class name="User" table="user"> <id name="id"> <generator class="identity"> </generator> </id> <property name="name" column="name"></property> <property name="password" column="password"></property> </class> </hibernate-mapping>


在指定主键生成策略的时候、配置了<generator class="identity"/> 、这是提供自动增长、为数据表中的主键自动增长、但是如果数据库没有定义id列为自动增长的话、就会出现The database returned no natively generated identity value错误、所以要在数据库中手动定义id列自动增长
分享到:
评论

相关推荐

    event_utils.rar_The Returned

    Returns a ui::Event wrapping a native event. Ownership of the returned value is transferred to the caller.

    error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

    git首次提交代码到远程仓库提示413错误,错误信息如下 git push --set-upstream origin master Enumerating objects: 153, done. ... HTTP 413 curl 22 The requested URL returned error: 413 Req

    pci-swiotlb.rar_The Returned

    Keep the generation correct by bumping rptr until it matches the index returned by the rearm - 1.

    mdesc.rar_The Returned

    Machine description operations are to be surrounded by grab and release calls. The mdesc_handle returned the grab is the first argument to all of the operational calls that work on mdescs.

    fifo.rar_The Returned

    This writes up to nbytes bytes to the FIFO If the head runs in to the tail, not all bytes are written The number of bytes written is returned

    mga_drv.rar_The Returned

    If the device is a PCI G450, zero is returned. Otherwise 2 is returned.

    KMP.rar_C++_The Returned

    The classical KMP algorithm for string matching (the target string can be modified in the main function, if any match is found, the matching position would be returned)

    formatosImagen.rar_The Returned_YCbCr

    From a given image, this code returns it in the following colour spaces RGB,NTCS,YCBCR,HSV. The fields are returned in a matrix of dimensions (:,:,12)

    Dimeric.Virtual.Database.

    For example, the macro for the database‘s current date and time would be CURRENT for the Informix dialect and getdate() for the SQL Server dialect. In VDB you would use the [now()] function. If you ...

    BM.rar_BM-algorithm_Berlekamp-Massey_The Returned_berlekamp _bm

    The Berlekamp-Massey algorithm is an efficient algorithm for ... Returned value (L) is the length of the shortest linear feedback shift register sequence that generates all bits in sequence sn.

    exportplotdata_cmenu.rar_The Returned

    EXPORTPLOTDATA_CMENU Context menu to export plot data to workspace or file ... as returned by PLOT), which allows the user to export the line s data to a workspace variable or a file

    DataHash_20130330.zip_DataHash_The Returned_edge matching

    Scanning is done by rotating the template and matching it to the image in various of angles, the best match is returned. Matching the template generalized hough transform. See the ReadRe file in the ...

    OCI Programmer's Guide

    If the number being returned from Oracle Database is not an integer, the fractional part is discarded, and no error or other indication is returned. If the number to be returned exceeds the capacity ...

    微软内部资料-SQL性能优化5

    If there is no clustered index, there is a sysindexes row for the table with an indid value of 0, and that row will keep track of the address of the first IAM for the table. The IAM is a giant bitmap...

    数位板压力测试

    The availability of drivers that support the features of the specification will simplify the process of developing Windows appli¬cation programs that in-corporate absolute coordinate input, and ...

    The system Message Box that is closed atuomatically after so

    The system Message Box that is closed atuomatically after some time(21KB)

    nf_nat_proto_unknown.rar_The Returned

    The "unknown" protocol. This is what is used for protocols we don t understand. It s returned by ip_ct_find_proto, Linux API.

    greenplum-db-6.2.1-rhel7-x86_64.rpm

    The option controls the value returned by gpinitsystem when warnings or an error occurs. If you specify this option, gpinitsystem returns 0 if warnings occurred during system initialization, and ...

    usb_windows.rar_AdbWinApi_AdbWinApi.dll_The Returned

    Structure usb_handle describes our connection to the usb device via AdbWinApi.dll. This structure is returned usb_open() routine and is expected in each subsequent call that is accessing the device.

    nf_nat_proto_tcp.rar_NAT TRANSPORT_The Returned

    this could be a inner header returned in icmp packet in such cases we cannot update the checksum field since it is outside of the 8 bytes of transport layer headers we are guaranteed.

Global site tag (gtag.js) - Google Analytics