About ManyToOne

51-60 of 84Refresh
Forum
1

Beginners questions

= GenerationType.AUTO) private Long id; @ManyToOne @Column(name = "VERLAG_ID") @JoinColumn(name="VERLAG_ID
Forum
1

Cannot sort descending, when ordering by caluculated float in a method

amount; @ManyToOne private Invoice invoice; InvoiceItem(float price, float
Forum
1

Cascade delete with unidirectional mapping

    Suppose entity A is referenced from entity B, like (A -> * B) but not actually having that reference, instead only B has @ManyToOne relationship to A and A has none. Is there a way to cascade delete of B's when deleting A? Or this should be done programatically with separate call to database
Forum
1

Cascading merge() leading to "Attempt to persist a reference to a non managed instance" error

{     @Id     @GeneratedValue     @SuppressWarnings("unused")     private int id;     @ManyToOne
Forum
1

Database Inconsistency or corruption

;   private Long revision;   protected boolean markedDeleted = false;   @ManyToOne   private Project project
Forum
1

Detaching objects after JOIN FETCH

Hi, I have a question about detaching objects after issuing query with JOIN FETCH. Let's say I have two classes: public class A { @ManyToOne B bClass } public class B { @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) List aClasses; } Now, I want
Forum
1

Efficient query on EmbeddedId

@ManyToOne Car car (which has an int id) (I know the annotation is not necessary in ODB, but it's just as
Forum
1

Find the error...JPA ENTITY HIBERNATE

javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.Table
Forum
1

find() delay

{   @Id @GeneratedValue(strategy=GenerationType.IDENTITY)   private int id;   @ManyToOne
Forum
1

Foreign key constraint issue

    @GeneratedValue     private long id;     @ManyToOne(optional = false, cascade = {})     @JoinColumn(name