Project

General

Profile

Anomalie #7293

Unit test fail if oneToMany doesn't have mappedBy

Added by Sandra B. about 5 years ago. Updated about 1 year ago.

Status:
Nouveau
Priority:
Normal
Assignee:
Jérome A.
Category:
Core
Target version:
Start date:
01/12/2016
Due date:
% Done:

0%

Estimated time:

Recurrences

History

#2Updated by Jérome A. almost 4 years ago

Cannot reproduce on 0.8 at android project level with

/* Translation.java */
@Table
@Entity
public class Translation {

    @Id
    @GeneratedValue(strategy = GeneratedValue.Strategy.MODE_IDENTITY)
    @Column (type = Type.INTEGER, hidden = true)
    private int id;

    @OneToMany(targetEntity = "TranslationItem")
    private ArrayList<TranslationItem> items;

}

/* TranslationItem.java */
@Table
@Entity
public class TranslationItem {

    @Id
    @GeneratedValue(strategy = GeneratedValue.Strategy.MODE_IDENTITY)
    @Column (type = Type.INTEGER, hidden = true)
    private int id;

    @ManyToOne(targetEntity = "Translation", inversedBy = "items")
    private Translation translation;

}

Also tested without the "inversedBy" on TranslationItem entity

Also available in: Atom PDF

Go to top
Add picture from clipboard (Maximum size: 200 MB)