Home » Search

About ManyToOne

61-70 of 84Refresh
Forum
1

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

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

Object as parameter results in exception

Hi,    I've got a simple JPA2 Criteria query which fails when doing an object equality. I verified this against EclipseLink and over there, it works. I'll Attach some code snippets to help figure it out:   @Entity() public class Product{ . . . @ManyToOne     private Compamy
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

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

Relationships and tracking changes

@Column(name = "ID") @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ManyToOne
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
Forum
1

Some details about db behavior

Suppose I have two entities... A B -> A B has a ManyToOne relationship with A. When my database is empty and I persist a valid B entity (that contains actual A reference) I observe some behavior that I'm not sure I understand. 1. In ObjectDB explorer I see Both B and A Entity classes available in
Forum
1

Visibility of changes in Transaction is not visible to a JPA QL Query

("unused") //used by JPA @ManyToOne private Singleton singleton; @Basic private String cachedKey
Forum
1

OrphanRemoval not working?

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

JPA vs JDO - which is more efficient for OneToMany queries?

") Vector orders; }   @Entity class Order { @ManyToOne Customer customer