JPA entity has no primary key?

前端 未结 5 765
灰色年华
灰色年华 2020-12-16 13:36

I have an Entity class:

@Entity
@Table(name=\"CMC_MAP_SERVER_INFO\")
@NamedQuery(name=\"CmcMapServerInfo.getMapServer\", query=\"SELECT c FROM CmcMapServerIn         


        
5条回答
  •  一整个雨季
    2020-12-16 14:11

    You can mark the applicationName or the ip address as the primary key (though not auto generated). It's ok even if neither of these columns are declared as primary keys in the database.

提交回复
热议问题