Home » Search

About ManyToOne

71-80 of 85Refresh
Forum
1

mappedBy problem

; @ManyToOne public Employee employee; } The address class will never persist
Forum
1

Need help to make this test work and define proper annotations for entities Lists

{         ...         @ManyToOne(cascade=CascadeType.PERSIST)         public CustomerDat customer
Issue
1

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

; @ManyToOne(fetch = FetchType.LAZY) @JoinTable(name = "Element_owns_Element
Forum
1

OrphanRemoval not working?

; ... } public class InvoiceItem implements Serializable { ... @ManyToOne private
Forum
1

Possible issue for JPQL IS EMPTY expression

other) { others.add(other); } } @Entity class OtherEntity { @ManyToOne
Forum
1

Problem persisting a TreeSet field

Hello, I am getting a "java.lang.IllegalArgumentException: Can not set java.util.TreeSet field Message.children to java.util.HashSet" when persisting a Message object with a parent/children relationship: @ManyToOne private Message parent; @OneToMany(mappedBy = "parent") private TreeSet
Forum
1

Problem with bidirectional link

(I had raised this issue in the past and have finally had time to come back to it and strip down the classes to a minimum). The problem seems to lie in having bidirectional links (viz, I have @OneToMany Map children and @ManyToOne Entry parent in my classes. I've attached
Forum
1

Problem with distinct select, order by and equivalent alias/attribute path

(strategy = GenerationType.AUTO)     private Long id;         private String name;         @ManyToOne
Forum
1

Query problem

Hi, Given : @Entity(name = "Inspiration") public class Inspiration implements Serializable {     ....     @ManyToOne(fetch = FetchType.EAGER)     protected Atelier atelier;     .... } I have a query : SELECT i FROM Inspiration i WHERE i.atelier.id = 3 When I run this query I get wrong
Forum
1

Removing an element from an @OneToMany doesn't work

Hello. I have a Parent and Child entities. // in the parent @OneToMany(mappedBy = "parent", fetch = FetchType.EAGER, cascade = CascadeType.ALL) private List children; // in the child @ManyToOne private Parent parent; Somewhere I do this: parent.getChildren().remove(0