ObjectDB Database Search
1-50 of 71 resultsjakarta.persistence.OneToOne Jakarta Persistence (JPA) Annotation Type jakarta.persistence. OneToOne Implemented Interfaces ... . If the relationship is bidirectional, the non-owning side must use the mappedBy element of the OneToOne annotation to specify the relationship field or property of the owning side. A OneToOne association usually | |
jakarta.persistence.OneToOne.targetEntity Jakarta Persistence (JPA) Method in jakarta.persistence. OneToOne Class targetEntity (Optional) The entity class that is the target of the association. Defaults to the type of the field or property that stores the association. Default: void/class Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.OneToOne.cascade Jakarta Persistence (JPA) Method in jakarta.persistence. OneToOne CascadeType[] cascade (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded. Default: {} Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.OneToOne.fetch Jakarta Persistence (JPA) Method in jakarta.persistence. OneToOne FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the associated entity must be eagerly fetched | |
jakarta.persistence.OneToOne.optional Jakarta Persistence (JPA) Method in jakarta.persistence. OneToOne boolean optional (Optional) Whether the association is optional. If set to false then a non-null relationship must always exist. Default: true 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.OneToOne.orphanRemoval Jakarta Persistence (JPA) Method in jakarta.persistence. OneToOne boolean orphanRemoval (Optional) Whether to apply the remove operation to entities that have been removed from the relationship and to cascade the remove operation to those entities. Default: false Since: Jakarta Persistence (JPA) 2.0 | |
JPA Entity Fields ). Every persistent field can be marked with one of the following annotations: OneToOne , ManyToOne ... { @Basic ( optional =false) Integer field1; @ OneToOne ( cascade = CascadeType . ALL ) MyEntity field2 ... { @ OneToOne MedicalInsurance medicalInsurance; } @Entity public class MedicalInsurance { @ OneToOne | |
@OneToOne query issue with OR and IS NULL; @ OneToOne (mappedBy = "other", cascade ... ; private int counter; @ OneToOne private | |
A bidirectional OneToOne association with a shared primary key Hi, In Hibernate, it is possible (using Hibernate specific annotations) to define a bidirectional @ OneToOne association that has a shared primary key, example: http://fruzenshtein.com ... attribute ? Thanks andrewv Andrew Voumard No annotations are required by ObjectDB (you may use @ OneToOne | |
Deleting JPA Entity Objects can be referenced by a collection field): @Entity class Employee { : @ OneToOne ( cascade ... which can be specified using the orphanRemoval element of the @ OneToOne and @OneToMany annotations: @Entity class Employee { : @ OneToOne ( orphanRemoval =true) private Address address; : } When an Employee | |
Detached Entity Objects field): @Entity class Employee { : @ OneToOne ( cascade = CascadeType . DETACH ) private Address address ... can be referenced by a collection field): @Entity class Employee { : @ OneToOne ( cascade = CascadeType . MERGE | |
Retrieving JPA Entity Objects FetchType . LAZY in either @ OneToOne or @ManyToOne annotations (currently ObjectDB does not distinguish ... can be referenced by a collection field): @Entity class Employee { : @ OneToOne ( cascade = CascadeType | |
Storing JPA Entity Objects { : @ OneToOne ( cascade = CascadeType . PERSIST ) private Address address; : } In the example | |
jakarta.persistence.JoinColumn public Set getOrders() { return orders; } See Also: ManyToOne OneToMany OneToOne JoinTable ... . If the join is for a OneToOne or ManyToOne mapping using a foreign key mapping strategy, the foreign key ... entity. If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne | |
jakarta.persistence.PrimaryKeyJoinColumn annotation to join a secondary table to a primary table; and it may be used in a OneToOne mapping in ... class ValuedCustomer extends Customer { ... } See Also: SecondaryTable Inheritance OneToOne ForeignKey ... for the referencing entity ( OneToOne mapping). Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.MapsId Jakarta Persistence (JPA) Annotation Type jakarta.persistence.MapsId Implemented Interfaces: Annotation Target: Method, Field Designates a ManyToOne or OneToOne relationship attribute that provides ... or OneToOne relationship declared by a dependent entity is annotated MapsId , an instance | |
jakarta.persistence.JoinColumn.name. If the join is for a OneToOne or ManyToOne mapping using a foreign key mapping strategy, the foreign key ... . If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne / OneToMany | |
jakarta.persistence.JoinColumn.table the primary table of the applicable entity. Default: If the join is for a OneToOne or ManyToOne ... , the name of the table of the target entity. If the join is for a ManyToMany mapping or for a OneToOne or | |
jakarta.persistence.JoinTable ManyToOne , OneToOne , ManyToMany , or OneToMany . See Also: JoinColumn JoinColumns Since: Jakarta | |
jakarta.persistence.ManyToOne annotation. Alternatively, an optional OneToOne association is sometimes mapped to a join table | |
jakarta.persistence.FetchType ManyToMany OneToMany ManyToOne OneToOne Since: Jakarta Persistence (JPA) 1.0 Enum Constants EAGER Data | |
jakarta.persistence.AssociationOverrides; @Version protected Integer version; @ManyToOne protected Address address; @ OneToOne protected Locker | |
jakarta.persistence.CascadeType::cascade OneToOne ::cascade OneToMany::cascade ManyToMany::cascade Since: Jakarta Persistence (JPA) 1.0 Enum | |
significant performance decrease public String objectName; @ OneToOne public ObjectType objectType; @Index public Integer state; public Map ... = new ArrayList (); @ OneToOne (fetch=FetchType.LAZY) public ObjectNode currentLocation; @ OneToOne ... ArrayList (); @ OneToOne (fetch=FetchType.LAZY) public ObjectNode linkedType; @OneToMany(fetch | |
Left join fetch behaviour doesn't retrieve children? the mappedBy on the OneToOne annotation. Note that i don't create any entity on that attribute. The test ... ; MyEntity(String name) { this.name = name; } // @ OneToOne (targetEntity = MyEntityChild2.class) @ OneToOne (targetEntity = MyEntityChild2.class, mappedBy = "myEntity | |
jakarta.persistence.PrimaryKeyJoinColumn.columnDefinition Jakarta Persistence (JPA) Method in jakarta.persistence.PrimaryKeyJoinColumn String columnDefinition (Optional) The SQL fragment that is used when generating the DDL for the column. This should not be specified for a OneToOne primary key association. Defaults to the generated SQL to create | |
jakarta.persistence.PrimaryKeyJoinColumn.name key column for the table for the referencing entity ( OneToOne mapping). Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.PrimaryKeyJoinColumn.referencedColumnName the same name as the primary key column for the table for the referencing entity ( OneToOne mapping). Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
Performance issue in a query due to compareTo calls) @ElementCollection private Map values = new HashMap (); @ OneToOne (fetch = FetchType.LAZY, cascade ... ; @ OneToOne (fetch = FetchType.EAGER) private TCStep step; //For performance reasons, we use a list ... (AccessType.FIELD) public class Values extends Identifiable { @ OneToOne (fetch = FetchType.EAGER) private | |
EntityManager.refresh takes a long time.REFRESH) private List comments = new ArrayList (); @ OneToOne (cascade = CascadeType.ALL) private SiteAuth ... ; @ OneToOne (cascade = {CascadeType.PERSIST}) private Image mainImage; @ OneToOne (cascade = {CascadeType | |
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 ... .persistence.Id; import javax.persistence. OneToOne ; @Entity public class MyEntity { @Id private String name ... = null; @ OneToOne (targetEntity = MyEntityChild.class, cascade = CascadeType.ALL,mappedBy | |
@OneToMany(fetch = FetchType.LAZY) list is always null the entity containing another one ( OneToOne ) entity with a byte[] array without calling the getter ... Parent { // ...id @ OneToOne (fetch = FetchType.LAZY, cascade = CascadeType.ALL) private ByteData bydaData ... = GenerationType.AUTO) private int id; @ OneToOne (fetch = FetchType.LAZY, cascade = CascadeType.ALL) private OTO | |
Version 2.2.7 build 7/8 issue with null objects! With builds 6 and 5 works it correctly. Removing mappedBy from @ OneToOne (mappedBy ... ; @Basic(optional=false) private String name; @ OneToOne (cascade= CascadeType.ALL, fetch= FetchType.EAGER ... ; @ OneToOne (mappedBy = "address") private Customer customer; public Customer getCustomer() { return | |
Multiple Collection Fields not update correctly to another entity and they both reciprocally do: EntityB: @ OneToOne (cascade = CascadeType.ALL) EntityA entityA; EntityA: @ OneToOne (cascade | |
Multi threading on DMOs by lazy loading It is possible to use lazy loading on fields of attached entities by several threads? Example: class EntityZ { @ OneToOne (fetch = FetchType.LAZY) EntityX fieldX; @ OneToOne (fetch = FetchType.LAZY) EntityY fieldY; @ElementCollection (fetch = FetchType.LAZY) List list; } We want to load the entity | |
General Performance Issues Illustrated with a Specific Method; import javax.persistence.ManyToOne; import javax.persistence. OneToOne ; import javax.persistence.Table ... = GenerationType.AUTO) private Long id; private static final long serialVersionUID = 1L; @Index @ OneToOne | |
Composite indexes ? #4. Are @Index field used also on relations? @ OneToOne , @ManyToOne? I don't want to start ... with and without such an index. 4. Are @Index field used also on relations? @ OneToOne , @ManyToOne | |
Problem with @Basic(fetch = FetchType.LAZY) with @ OneToOne (fetch = FetchType.LAZY, cascade = CascadeType.ALL) private LargeString description; @ OneToOne (fetch = FetchType.LAZY, cascade = CascadeType.ALL)   | |
Extra uninitialised entities spawned on merge() @ OneToOne Element child . package test; import java.util.*; import javax.persistence.*; public class ... ; private Element child; @ OneToOne   | |
Pre-detach loading: retrieval by navigation not working in if statement" Boolean value wrapper BooleanValue entity. This is @ OneToOne with explicit LAZY fetch. - A BooleanValue ... ' which is a "deep" Float value wrapper FloatQuantity entity. This is @ OneToOne with explicit LAZY fetch | |
Upgrade to 2.4.1_01 our code for 2.3.7_18, we had @ OneToOne (cascade=CascadeType.ALL, fetch=FetchType.EAGER ... more @ OneToOne gives: [ObjectDB 2.4.1_01] javax.persistence.PersistenceException Failed to clear field | |
Mysterious "Attempt to persist a reference to a non managed instance" error.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence. OneToOne ; import static ... ; @ OneToOne (fetch=EAGER, cascade=PERSIST) public Ostrich ostrich; @ManyToMany | |
Using of Second Level Cache MyEntity1 { @ OneToOne private MyEntity2 | |
ArrayIndexOutOfBoundException { @ OneToOne (fetch = FetchType.EAGER) private CacheableJobInfo ji; @ OneToOne (fetch = FetchType.EAGER) private ... . The problem dissapeared when removing the @ OneToOne (fetch = FetchType.EAGER) annotation. I am not | |
NullPointerException when using multithreading private String secondId; @ OneToOne (cascade=CascadeType.ALL) private HashMap myMap; } @Embeddable public class EmbeddableA { @ OneToOne (cascade=CascadeType.ALL) private HashMap myMap; } @Embeddable public class EmbeddableB { @ OneToOne (cascade=CascadeType.ALL) private HashMap myMap; } I'm am trying | |
ClassCastException after upgrade to 2.3.5_03 follows: @Entity public class ObjectDbMessagePayload { @Id String id; @ OneToOne (orphanRemoval=true, cascade=CascadeType.ALL, fetch=FetchType.EAGER) private Object payload; @ OneToOne (orphanRemoval=true | |
Tracking changes to new collections (in enhancement mode) after flush = "uid") private String uid; @ OneToOne (fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH ... uid; @ OneToOne (fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH, CascadeType.DETACH }) private | |
Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct) simple @ OneToOne relationship fields that likewise become null: private List ownedElements = new ... my larger real-world application, lots of other @OneToMany and @ OneToOne fields are also null). In | |
New entity objects are duplicated on merge cascading; @ OneToOne (fetch = FetchType.LAZY, cascade = CascadeType.ALL)   ... ; @ OneToOne (fetch = FetchType.LAZY, cascade = CascadeType.ALL)   |