Internal Website Search

51-91 of 91 results

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

; @ ManyToOne     private Location location;     public Street() {  

Are indexes implicitly created for relationships?

Do the following annotations @OneToMany @ ManyToOne @ManyToMany @OneToOne imply @Index   ? Thanks, Carl   FastModel Ben Schreiber Actually these annotations (except @ManyToMany ) should apply @Unique on the @One side. But ObjectDB doesn't apply these indexes automatically

OrphanRemoval not working?

{ ... @ ManyToOne private Invoice invoice; ... } I'm expecting, that removing invoiceitem from the list removes

Beginners questions

; @ ManyToOne @Column(name = "VERLAG_ID") @JoinColumn(name="VERLAG_ID", insertable=false, updatable=false

Global way to set Lazy-loading fetch functionality for all the fields

Hi, for cascading persist, I have 3 choices: - Either locally (@OneToOne(cascade=CascadeType.PERSIST)) - Either at objectdb level ( ) - Either at JPA global level (orm.xml).   For defining fetch policy, I know the local way to do it (@ ManyToOne (fetch=FetchType.LAZY)). Is there any way

@Column( name = "columnName") doesn't work

I have created following entity class with custom fields @Entity public class AfwDataKey { @Id @GeneratedValue @Column(name = "KEY_ID") private long id; private Long timestamp; @ ManyToOne @Column(name = "KEY_DESCRIPTOR") private AfwKeyDescriptor keyDescriptor; @OneToMany(fetch = FetchType.LAZY

Query only works correctly when debug printing results

@GeneratedValue private long id; @ ManyToOne private RequirementLevelEntity wrappingReqLevelEntity

Maintaining referential integrity

annotations like "OneToMany" and " ManyToOne ", but the result is the same. What am I supposed

LEFT (OUTER) JOIN problem when mappedBy is defined

public String toString() { return name; } } @Entity public class InvoiceItem{ @ ManyToOne private Invoice

An ArrayIndexOutOfBoundsException with nested entities and enhanced entities

{ @ ManyToOne (targetEntity = DataTypeImpl.class, cascade = {CascadeType.ALL }, fetch = FetchType.LAZY

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

Adding EntityListener Throws Unexpected Internal Exception

;   @MapsId     @ ManyToOne (fetch = FetchType.LAZY)    

Possible issue for JPQL IS EMPTY expression

addOtherEntity(OtherEntity other) { others.add(other); } } @Entity class OtherEntity { @ ManyToOne MyEntity

Fields in objects not populated in query result.

id; private String name; private String description; @ ManyToOne (cascade=CascadeType.PERSIST

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

; @SuppressWarnings("unused")     private int id;     @ ManyToOne

List always null

; @ ManyToOne (targetEntity = Categoria.class)     private List categorias;  

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

Multi-tenant capability with hierarchies

.hibernate.AnnotationException: @OneToOne or @ ManyToOne ", even if I don't use the bean because I

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

; @Entity class Order { @ ManyToOne Customer customer } Are you saying that the Customer.orders field

Database Inconsistency or corruption

markedDeleted = false;   @ ManyToOne   private Project project;   @javax.persistence.OneToMany

mappedBy problem

.IDENTITY) public Long id; public String line; @ ManyToOne public Employee employee; } The address

Why are my Map entries not stored?

;@ ManyToOne (fetch = FetchType.EAGER)     private Ticket ticket = null;    

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 to fetch all B classes

Items in list are doubled, when the entity class is not enhanced

static final long serialVersionUID = 1L; @Id @GeneratedValue private Long id; @ ManyToOne private

Efficient query on EmbeddedId

on an @Entity field? Example: int carId or @ ManyToOne   Car car (which has an int id) (I know

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); manager.merge(parent

@OneToMany(fetch = FetchType.LAZY) list is always null

@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "b") private int id; @ ManyToOne

Foreign key constraint issue

; @ ManyToOne (optional = false, cascade = {})     @JoinColumn(name="PARENT_ID", nullable = false

Mapped (Inverse) LAZY @OneToMany vs. Unmapped LAZY @OneToMany

;     @ ManyToOne (fetch = FetchType.LAZY, cascade = CascadeType.ALL)   

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

"Problem" with cross join

.JOINED) ... @ ManyToOne private CI ci; subclass CIstring private String text; I am not sure

Relationships and tracking changes

") @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ ManyToOne @Column(name = "VERLAG

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

Storing a tree of data (depth=3)

; /** real name of person in life. */ @NonNull @ ManyToOne (cascade = CascadeType.MERGE) private Performer

Find the error...JPA ENTITY HIBERNATE

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

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 the offending classes

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

{ private float price; private float amount; @ ManyToOne private Invoice invoice; InvoiceItem(float

com.objectdb.o._PersistenceException: Failed to locate set method for field property using reflection

(); ... public PlatformTicker() { } ... @ ManyToOne public Platform getPlatformConnector() { return

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

() { return ownedElements; } private Element owner; @ ManyToOne (fetch = FetchType.LAZY) @JoinTable(name

JPQL support for mapped by (inverse) collections

;              @ ManyToOne    

Freeze during save

{ @ ManyToOne (cascade=CascadeType.PERSIST) MyNode parent; @OneToMany(cascade=CascadeType.PERSIST) List