ObjectDB Database Search
1-50 of 77 resultsjakarta.persistence.OneToMany.mappedBy Jakarta Persistence (JPA) Method in jakarta.persistence.OneToMany String mappedBy The field that owns the relationship. Required unless the relationship is unidirectional. Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.OneToOne.mappedBy Jakarta Persistence (JPA) Method in jakarta.persistence.OneToOne String mappedBy (Optional) The field that owns the relationship. This element is only specified on the inverse (non-owning) side of the association. Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.ManyToMany.mappedBy Jakarta Persistence (JPA) Method in jakarta.persistence.ManyToMany String mappedBy The field that owns the relationship. Required unless the relationship is unidirectional. Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
JPA Entity Fields ( mappedBy ="department") Set employees; } The mappedBy element (above) specifies that the employees ... .department = :d The mappedBy element defines a bidirectional relationship. In a bidirectional relationship ... annotation: @Entity public class Department { @OneToMany ( mappedBy ="department") @OrderBy ("name | |
LEFT (OUTER) JOIN problem when mappedBy is defined invoices without items! Only invoices with items. When I remove mappedBy from @OneToMany annotation ... public class Invoice { @OneToMany( mappedBy = "invoice", fetch= FetchType.EAGER, orphanRemoval=true | |
mappedBy problem If I put the mappedBy element to the @OneToMany, the owned side (the many side) will never persist ! for example @Entity public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long id; public String name; @OneToMany(targetEntity=Address.class, mappedBy ="employee | |
jakarta.persistence.ManyToMany side, and the non-owning side must use the mappedBy element of the ManyToMany annotation to specify ... the mappedBy element of the ManyToMany annotation to specify the relationship field or property of the embeddable class. The dot ( . ) notation syntax must be used in the mappedBy element to indicate | |
jakarta.persistence.OneToOne. If the relationship is bidirectional, the non-owning side must use the mappedBy element of the OneToOne annotation ... side of the relationship, the non-owning side must use the mappedBy element of the OneToOne annotation to specify ... the mappedBy element to indicate the relationship attribute within the embedded attribute. The value | |
jakarta.persistence.OneToMany is bidirectional, the mappedBy element must be used to specify the relationship field or property ... . If the relationship is bidirectional, the mappedBy element must be used to specify the relationship ... association using generics // In Customer class: @OneToMany(cascade = ALL, mappedBy = "customer") public | |
jakarta.persistence.ManyToOne is bidirectional, the non-owning OneToMany entity side must use the mappedBy element to specify ... , the non-owning OneToMany entity side must use the mappedBy element of the OneToMany annotation ... side of the relationship. The dot ( . ) notation syntax must be used in the mappedBy element to indicate | |
EntityManager.refresh takes a long time relationsto itself with a cascade refresh: @OneToMany( mappedBy = "person", cascade = CascadeType.ALL) private List openIdAuths = new ArrayList (); @OneToMany( mappedBy = "person", cascade = CascadeType ... private List selectedPersons = new ArrayList (); @ManyToMany( mappedBy = "selectedPersons", cascade | |
new objects not available in mappedBy associations Given a mappedBy association: e.g: @OneToMany( mappedBy ="department") public List employees;   ... the department object" ? How does one refresh an object? If the mappedby tag maps to: SELECT e from EMPLOYEE e ... If the mappedby tag maps to: SELECT e from EMPLOYEE e WHERE e.department=department then shouldn't | |
jakarta.persistence.MapKey( mappedBy = "department") @MapKey // map key is primary key public Map getEmployees() {... } ... } @Entity ... { ... @OneToMany( mappedBy = "department") @MapKey(name = "name") public Map getEmployees | |
Error 363 - Failed to read value of inverse relationship { @Id private String id; @OneToMany( mappedBy ="town") private Set events; public Set getEvents() { Set ... (), blockedUserList = new ArrayList (); @ManyToMany( mappedBy = "friendWishList") private List possibleFriends; @ManyToMany( mappedBy = "blockedUserList") private List invisibleUsers; @ManyToOne private | |
jakarta.persistence.AssociationOverride; } @Entity public class PhoneNumber { @Id int number; @ManyToMany( mappedBy = "contactInfo.phoneNumbers | |
jakarta.persistence.OrderBy getStudents() { ... } ... } Example 2: @Entity public class Student { ... @ManyToMany( mappedBy | |
Left join fetch behaviour doesn't retrieve children? with mappedBy to the parent. This just break the test ! Test by yourself by adding / removing the mappedBy on the OneToOne annotation. Note that i don't create any entity on that attribute. The test ... = MyEntityChild2.class) @OneToOne(targetEntity = MyEntityChild2.class, mappedBy = "myEntity | |
Optimistic locking: prevent version increment on entity collection attribute seem to have some issues. I have changed my classes to have a OneTomany mappedBy relationship as follows ... ; @Id private long id; @OneToMany( mappedBy ="document")   ... static long ID_SEQ = 0; @Id private long id = ID_SEQ++; @OneToMany( mappedBy ="document") private | |
Why are my Map entries not stored?, cascade=CascadeType.ALL, mappedBy = "ticket", orphanRemoval=true ... (EnumType.STRING) private Map states = new HashMap (); Is this correct now? " mappedBy " is not required ... @ MappedBy : In that case the map content will be stored embedded in the Ticket instances and no  | |
Bidirectional OneToMany is slow on updated items: @OneToMany(cascade = {CascadeType.ALL}, fetch = FetchType.LAZY/*, mappedBy = "person"*/) private Set ... Thanks for the reply. This looks great. But without the mappedby , there are to independent ... ? Is there a way, not to change the code. Instead set a property to force objectdb to handle all mappedby as | |
Detaching objects after JOIN FETCH? support Support While building test case I get two different cases: 1. When not using mappedBy , like in example above, detached objects are visible even after closing em. 2. When using mappedBy in class B (this is the case in my code), detached objects from relation are not visible. I should add mappedBy | |
Version 2.2.7 build 7/8 issue Hi all, I have problems with builds 7 and 8 when trying to sort entities with mappedBy ... with null objects! With builds 6 and 5 works it correctly. Removing mappedBy from @OneToOne( mappedBy ... ; @OneToOne( mappedBy = "address") private Customer customer; public Customer getCustomer() { return | |
Mapped By Fetch is very Slow again :( ). Here is the test case : 1- Create 100 000 entities with for each 1 entity with @OneToOne( mappedBy ... = null; @OneToOne(targetEntity = MyEntityChild.class, cascade = CascadeType.ALL, mappedBy = "myEntity") // Test by adding / remove " mappedBy " public MyEntityChild getEntityChild() {   | |
Error: Failed to write value of field X using reflection (oneToMany relation) Persona{ @OneToMany( mappedBy ="Pedido.cliente") public List pedidos; } The class Persona ... You have to change the value of the mappedBy attribute: @OneToMany( mappedBy ="cliente") i.e. specify the field | |
joining of tables( mappedBy = "address") public Set getEmployee() { return employee; } how can i solve this problem ... if it is bidirectional relationships also add a reference back from Address to Employee with a mappedBy setting | |
Problem persisting a TreeSet field relationship: @ManyToOne private Message parent; @OneToMany( mappedBy = "parent") private TreeSet children ... an ordinary persistent field instead of as an inverse field - remove he mappedBy setting, and update | |
Missing (null) elements in eager loaded references extends BaseCostElement { @OneToMany ( mappedBy = "parent" , fetch = FetchType. EAGER ) private List ... extends BaseCostElement { @OneToMany ( mappedBy = "parent" , fetch = FetchType. EAGER ) private List | |
OneToMany and cascade delete problem): @Entity public static class Store { @OneToMany(targetEntity = Offer.class, mappedBy = "store ... = Offer.class, mappedBy = "product", fetch = FetchType.LAZY, cascade = CascadeType.ALL) private Set offers | |
NoSuchFieldError: __odbTracker on NetBeans 7.3 + JBoss 7.1.1 serialVersionUID = 1L; @ManyToOne @Index private City city; @OneToMany( mappedBy = "owner") private List ... serialVersionUID = 33L; @OneToMany( mappedBy = "city") private List persons; @ManyToOne @Index private Person | |
Object explorer cannot open odb file. ObjectDB many-to-many relationship String code; @OneToMany( mappedBy = "user") @MapKey private Map ... code; @OneToMany( mappedBy = "project") @MapKey   | |
A bidirectional OneToOne association with a shared primary key relationship using "two unidirectional relationships" which (I assume) would not include a mappedBy ... annotations with no mappedBy ): @Entity public class Entity1 { Entity2 e2 | |
JPA vs JDO - which is more efficient for OneToMany queries? this. Using JPA: @Entity class Customer { @OneToMany( mappedBy ="customer") Vector orders; }   ... other operations. support Support wow - just tried it, pretty impressive. I used JPA, and the @OneToMany( mappedBy | |
Removing an entity throws exception( mappedBy = "customer", fetch= FetchType.LAZY) private List itemList; @OneToMany( mappedBy = "customer | |
Lazy loading does not work - crud takes long; @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, mappedBy ="project",fetch = FetchType.LAZY)   ... = CascadeType.ALL, orphanRemoval = true, mappedBy ="project",fetch = FetchType.LAZY)   | |
Relationships and tracking changes = GenerationType.AUTO) private Long id; @OneToMany (fetch=FetchType.LAZY,cascade=CascadeType.ALL, mappedBy ... annotations such as @Column and JoinColumn . Therefore, Java field names should be used in mappedBy . See also this manual page . support Support | |
_PersistenceException: Type is not found on getSingleResult.; private Municipio lugarNacimiento; @OneToMany( mappedBy | |
"Failed to serialize instance" of Set problem Hi, I'm trying to persists objects defined as follows: @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public abstract class AbstractContainer { ... @OneToMany(fetch = FetchType.LAZY, mappedBy ="parent") private Set abstractContainers = com.google.common.collect.Sets | |
ManyToMany Set is null = FetchType. EAGER , cascade={CascadeType. DETACH ,CascadeType. MERGE ,CascadeType. REFRESH }, mappedBy | |
Problem with queries on lists with reverse mapping query. If the "team" is omitted from the player and targetEntity = Player.class, mappedBy | |
find() cost unreasonable time!) private int id; @ManyToOne @JoinColumn(name="parent") protected Nodes parent; @OneToMany( mappedBy | |
OrphanRemoval not working? Dear all, I have entities Invoice and InvoiceItem, their relation is defined: public class Invoice implements Serializable { ... @OneToMany( mappedBy ="invoice", fetch=FetchType.EAGER, orphanRemoval=true, cascade=CascadeType | |
Beginners questions=CascadeType.ALL, mappedBy ="VERLAG_ID") private List users; Table "EBUser": @Entity(name="USER | |
Is it possible to remove parent/child entities without refresh?; @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "parent | |
Inverse OneToMany Mapping and EmbeddedId; objectdb-2.9.0_03 * * issue: Inverse @OneToMany( mappedBy ... ; @OneToMany ( mappedBy = "a" ) public List abs ... ( mappedBy = "b" ) public List abs ;   | |
Unexpected Exception during commit (and other classes). Please notice that ObjectDB can manage collections directly with no mappedBy - and it is also much more efficient. Therefore, consider removing the mappedBy definition instead ... of entities that are not used as a collection, I assumed a mappedBy relationship would be better | |
NullPointer when accessing persistent field as follows; @OneToMany(cascade=CascadeType.ALL, mappedBy ="z_component") @MapKey(name="z_schemeName ... static class A { @OneToMany(targetEntity = B.class, mappedBy ... (cascade=CascadeType.ALL, mappedBy ="z_aqera") @MapKey(name="z_registerId") private | |
After using the enhancer, Lazy loaded collections are no longer loading. They are set as null, CascadeType.PERSIST}, mappedBy ="account", fetch = FetchType.LAZY) @JoinColumn(name = "project_id", unique=true ... ; mappedBy ="account", fetch = FetchType.LAZY)   | |
com.objectdb.o.InternalException: null extends PersistableObject { @OneToOne( mappedBy = "spouse") private ... = Payment.Periodicity.QUARTERLY; @OneToMany( mappedBy = "customer", fetch | |
Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct) ArrayList (); @OneToMany( mappedBy = "owner", cascade = CascadeType.ALL) public List getOwnedElements ... is to set the fetch type to EAGER: @OneToMany( mappedBy = "owner", cascade = CascadeType.ALL, fetch=FetchType | |
ObjectDB 2.9.1 Added support of embedded path expressions to mappedBy fields ( issue #2917 ) Fixed the SectionClassifier retrieval bug ( issue #2912 ). Fixed log file location for some server log messages ( issue #2914 ). |