Internal Website Search
51-100 of 163 resultsOn initialisation of lists: impact on migration from EclipseLink to ObjectDB, will be done by EntityManager.persist() @ OneToMany (cascade=CascadeType.ALL) public List getBlocks ... ArrayList (); @ OneToMany public List getBlocks() { return blocks; } public void setBlocks(List blocks ... . There are cases where one should explicitly init such a @ OneToMany list | |
Does ObjectDB support lazy loading? a Parent class which contains List , marked with @ OneToMany . After persisting a Parent object, (in ... to @ OneToMany (fetch=FetchType.EAGER), the properties can be read. It seems to me that ObjectDB doesn't ... A { @Id @GeneratedValue Long id; @ OneToMany (fetch=FetchType.LAZY, cascade=CascadeType.ALL) List list | |
can't get HashMap out of the database annotating the map with @ OneToMany (fetch=FetchType.EAGER). Outside the DAO method only fields ... signingDate; @ OneToMany (fetch=FetchType.EAGER, cascade=CascadeType ... class GuestHolder { // Persistent Fields: @Id @GeneratedValue Long id; @ OneToMany (fetch=FetchType | |
Merge Issue: Attempt to reuse an existing primary key value class A { @ OneToMany (cascade=CascadeType.ALL)   ... ; static class A { //@ OneToMany (fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "parent") @ OneToMany (fetch | |
Issue with orphanRemoval and multiple EntityManagers Hi, We have a problem where our database size grows over time more than expected. We've traced it down to the following issue: I have some entities that are using OneToMany relationship ... ; @ OneToMany (cascade=CascadeType.ALL, fetch=FetchType.EAGER, orphanRemoval=true)   | |
Multiple Collection Fields not update correctly v2.8.8_2 I have an entity that has 2 collection fields: @ OneToMany (fetch = FetchType.EAGER) Collection position; @ OneToMany (fetch = FetchType.EAGER) Collection rotation ; Now if I persist them so the values are: position | |
problem with lazy loading - unittest project attached hi, i'm still testing objectdb together with spring-data-jpa. i made a test which should simulate 4 requests 1. save entity 2. read an existing entity, add onetomany relation 3. read an existing entity, add another onetomany relation 4. read entity, get relations. i have the feeling this is not | |
"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 ... ObjectDB tries to serialize the collection using ordinary Java serialization ignoring the @ OneToMany | |
List of Enum Values in an entity LAZY to EAGER : private @ OneToMany (fetch=FetchType.EAGER) List flags; According ... that the @ OneToMany works here? Thank you Flashbaer Flashbaer Joachim Beig Eclipse is right. It shouldn't | |
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 | |
Is it possible to remove parent/child entities without refresh?.persistence. OneToMany ; import javax.persistence.Persistence; import org.junit.AfterClass; import org ... ; @ OneToMany (fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "parent | |
Merge with Parent/Child entities not possible.persistence.MapKey; import javax.persistence. OneToMany ; import javax.persistence.Persistence; import javax ... { @Id @GeneratedValue private long id; @ OneToMany (fetch = FetchType.LAZY | |
TreeSet and compareTo() issue through a collection field in another class that uses eager fetch: @ OneToMany (fetch = FetchType.EAGER ... valid: @ OneToMany (fetch = FetchType.EAGER, cascade=CascadeType.PERSIST | |
Persisting collection where members are subclasses OK, I have a number of classes which are all subclasses of Entry (e.g., Folder, Link, Book). In the Folder class, there is a @ OneToMany Map children If I store something in that map ... ; @ OneToMany (cascade=CascadeType.PERSIST)   | |
composite index not used in query we defined a composite index for class Action: @Index(name="ssst",members={"startDate","state","subType","type"}) and an index for the OneToMany @ OneToMany (fetch=FetchType.LAZY) @Index public List objectsInCharge = new ArrayList (); on running a query like select count(a) from Action a JOIN | |
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 | |
LazyInitialization / join fetch the fetch join? If so should I do to all fields of List , ie OneToMany or ... do to all fields of List , ie OneToMany or should also be done for joins ? Grateful. rafael_moreira Rafael | |
LAZY @ManyToOne field functions as EAGER an unmapped @ OneToMany list is not still viewable, although a mapped @ OneToMany list is, which I | |
How to use JOIN FETCH?.MapKeyTemporal; import javax.persistence. OneToMany ; import javax.persistence.Persistence; import javax ... ; @ OneToMany @MapKeyTemporal(TemporalType.DATE) private Map addressHistory = new HashMap | |
Object explorer cannot open odb file. ObjectDB many-to-many relationship String code; @ OneToMany (mappedBy = "user") @MapKey private Map ... code; @ OneToMany (mappedBy = "project") @MapKey   | |
PostUpdate collection null; @ OneToMany (fetch=FetchType.EAGER) private ArrayList myCollection = new ArrayList ... ; @ OneToMany (fetch=FetchType.EAGER | |
Removing an entity throws exception; optional=false, orphanRemoval=true) private Address address; @ OneToMany (mappedBy = "customer", fetch= FetchType.LAZY) private List itemList; @ OneToMany (mappedBy = "customer | |
orphanRemoval = true not working when CascadeType.REMOVE is disabled; @ OneToMany (orphanRemoval = true) private Set ... , addresses=[Address{name='name_2'}, Address{name='name_3'}]} I'm try use @ OneToMany (cascade | |
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 | |
Why are my Map entries not stored? private long id; @ OneToMany (fetch = FetchType.EAGER ... the Explorer. itsme Martin Petzold I have now changed to and it is working: @ OneToMany (fetch | |
Is there any restriction when using fetch=FetchType.LAZY ? am using in object declaration @ OneToMany (fetch=FetchType.EAGER, cascade = CascadeType.ALL) private ... @ OneToMany (fetch=FetchType.LAZY, cascade = CascadeType.ALL) private LinkedList referencedObj | |
OEM enhancing Hello, I have question regarding OEM licence enhancement. @ OneToMany (fetch = FetchType.EAGER, cascade = CascadeType.ALL) private SomeClass[] props; @ OneToMany (fetch = FetchType.EAGER, cascade = CascadeType.ALL) private Map vars = new TreeMap (); Are these classes(SomeClass, SomeClass2), when not | |
Extra uninitialised entities spawned on merge() In the following, Element is a base entity class, with a bi-directional @ManyToOne-@ OneToMany relationship Element owner - List ownedElements , and Example is a subclass entity with a relationship ... (); @ OneToMany (mappedBy = "owner",   | |
Problem with entities detection.persistence. OneToMany ; import javax.persistence.Table; import javax.persistence.Temporal; import javax ... ; @Embedded private Direccion direccion; @ OneToMany (mappedBy = "idAlumno") private List | |
Weird behaviour with enhanced classes and embedded entities.persistence.Id; import javax.persistence. OneToMany ; import javax.persistence.Persistence; public ... ; int id; @ OneToMany (cascade = CascadeType.ALL, fetch = FetchType | |
Is it ok to put list or map of embeddable objects in entity ? Serializable { (...) @ OneToMany (cascade = CascadeType.ALL) List entityCList; } Where EntityC is some ... ;@ OneToMany (cascade = CascadeType.ALL) List embeddableBList; } It is not | |
Storing a tree of data (depth=3) (I've tried @ OneToMany , @Embedded and @ElementList) A role is a performer (I've tried inside that class ... of composers, list of tags and each of them are entity with @ OneToMany and are working fine (when I | |
How to move @Embedable collection to a dedicated entity class? we have a Parent and Child class with onetomany relation @Entity class Parent { @Id Long id; @ OneToMany (orphanRemoval = true, cascade = CascadeType.ALL) List children; } @Embeddable class Child{ @Id | |
Left join fetch behaviour doesn't retrieve children? how much collection1 items we have in the bag ? ( and no matter kind of JPA annotation @ OneToMany , @ManyToMany ... we have in the bag? ( and no matter kind of JPA annotation @ OneToMany , @ManyToMany | |
Cannot sort descending, when ordering by caluculated float in a method { @ OneToMany (cascade=CascadeType.PERSIST)   ... , to demonstrate the issue: @Entity public class Invoice { @ OneToMany (mappedBy = "invoice", fetch | |
Apparent Lazy Loading issues./ OneToMany state: "When the collection is a java.util.Map, the cascade element and the orphanRemoval ... .ALL on a OneToMany map, then the cascade ONLY applies to the values, NOT to the key. This means all keys | |
Remove not working(); emf.close(); } @Entity public static class A { @ OneToMany (mappedBy="a", cascade=CascadeType | |
_PersistenceException: Type is not found on getSingleResult.; private Municipio lugarNacimiento; @ OneToMany (mappedBy | |
Is there a way to set EAGER fetch on all "ToMany" collection relationships Given that the default seems to be FetchType.LAZY for all collections @ OneToMany and @ManyToMany. Such as a configuration option. Instead of having to explicitly set fetch in annotation code in every relationship. webel Dr Darren Kelly No. There is no such configuration option, since having EAGER | |
Possible cause for "Enhancement of type ... is old and cannot be used": FAILS on @ OneToMany with @TableGenerator/strategy = GenerationType.TABLE (www.objectdb.com | |
LifeCycle Event with Embeddable classes Hello, is there a way that lifecycle events like prepersist or preupdate are also fired for embeddable classes, not just for entities? My case looks as follows: @Entity public class Foo { @Id @GeneratedValue private Long id; private String description; @ OneToMany (cascade = CascadeType.ALL, fetch | |
Double persist of Entity field with Cascade.ALL bookTitle; @ OneToMany (cascade= CascadeType.ALL, fetch= FetchType.EAGER) private List chapters; The Chapter | |
Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct), but the same problem happens to uni-directional @ OneToMany fields, and also there seem to be some ... ArrayList (); @ OneToMany (mappedBy = "owner", cascade = CascadeType.ALL) public List getOwnedElements ... my larger real-world application, lots of other @ OneToMany and @OneToOne fields are also null). In | |
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 ... .RemoteTestRunner.main(RemoteTestRunner.java:197) As before a Map structure was being accessed. @ OneToMany | |
spuriously objectdb objects have null references definitions are (for the null references above): ... @ OneToMany (fetch=FetchType.LAZY) @Index public List actions = new ArrayList (); ... @ OneToMany (fetch=FetchType.LAZY) @Index public List childNodes | |
After using the enhancer, Lazy loaded collections are no longer loading. They are set as null; } @Override public void setId(Long id) { this.id = id; } @ OneToMany (cascade={CascadeType.MERGE ... ; @ OneToMany (cascade={CascadeType.MERGE, CascadeType.PERSIST},   | |
Tracking changes to new collections (in enhancement mode) after flush, CascadeType.DETACH }) private ModelElementImpl element; @ OneToMany (fetch = FetchType.EAGER, cascade ... ModelElementImpl element; @ OneToMany (fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH | |
NullPointerException on TreeSet load public static class MyEntity { @ OneToMany (cascade=CascadeType ... { @ OneToMany (cascade=CascadeType.PERSIST, fetch = FetchType.EAGER)   | |
com.objectdb.o.InternalException: java.lang.NullPointerException Hello, I have a CUIT entity, with a OneToMany List field called razonesSociales (that can be null): @ OneToMany (mappedBy = "cuit") private List razonesSociales; When I run this query it works ok: SELECT COUNT(item.sysID) FROM CUIT item WHERE ( (item.sysStatus.sysID=1) AND  | |
ArrayIndexOutOfBoundsException on flush to in the first exception is stored in a HashMap object within the parent entity: @ OneToMany |