eclipselink

    1熱度

    1回答

    隨着Permission是一個枚舉,是可以選擇的所有用戶,而無需使用JPA標準API一定的權限: @Entity public class User { @ElementCollection @CollectionTable(joinColumns = @JoinColumn(name = "USER_ID")) private Set<Permission> p

    3熱度

    1回答

    如果我設置了具有附加標準約束的父級和子級關係的父/子關係,然後使用@JoinFetch,則childs additionalCriteria將被忽略。 例如: TableA.java: @javax.persistence.Entity @Table(name = "TABLE_A") @AdditionalCriteria("this.tableAfield2=:propA") publi

    1熱度

    1回答

    我想插入數據使用JPA一對一映射連同複合主鍵在mysql中。已經有很多問題要求在這個論壇中的同一主題,但這對我沒有幫助。 但我得到的例外,如「非法參數異常不是一個已知的實體類型JPA」和「表‘callredirect.callredirect_callredirectgroup’不存在」 我的MySQL表: CREATE TABLE IF NOT EXISTS `CallRedirect` (

    0熱度

    1回答

    工作,我有一個簡單的實體對象和歷史政策 @Entity @Customizer(MyHistoryPolicy.class) @Table(name = "employee") public class Employee { @Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.ID

    0熱度

    1回答

    如何讀取性能在persistence.xml文件 我wanrt從屬性讀取數據庫用戶名和密碼文件進行的persistence.xml

    0熱度

    1回答

    我試圖通過JPA獲得與MySQL數據庫的連接,但它現在讓我瘋狂。我不知道如何我已經做到了,但現在當我再說一遍,我得到這個異常: [EL Warning]: metamodel: 2017-10-06 12:04:17.461--The collection of metamodel types is empty. Model classes may not have been found duri

    0熱度

    1回答

    我正在使用Vaadin和EclipseLink。有兩個表,一個是郵件,第二個在客戶。客戶的PK是customer_id,郵件的PK是mail_id。 表郵件具有Customer_id作爲外鍵。我如何綁定它? 我想: binder.forField(fkCustomerId) .withConverter(new StringToBigDecimalConverter(FormMessa

    0熱度

    1回答

    如何將複合唯一鍵(地址1和地址2)作爲Map鍵。像@MapKey(name =「address1」,name =「address2」),而不是唯一的唯一鍵@MapKey(name =「address1」)。 @Entity public class Person { @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL

    1熱度

    1回答

    我剛剛開始將一個較舊的MySQL/Spring/Eclipselink項目移植到MariaDB。我遇到與表創建一個問題,可以如下證明: MariaDB [spasm]> CREATE TABLE Configuration (ID BIGINT NOT NULL, Attribute VARCHAR(190) NOT NULL UNIQUE, Value VARCHAR(255) NOT NULL

    1熱度

    2回答

    創建表下面是我的命名實體類: package az.bank.entities; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import jav