About cascade

forum_thread

Double persist of Entity field with Cascade.ALL

I am building a JavaEE application using Netbeans 7.0.1, Glassfish 3.1 and ObjectDB 2.3.3. I have a Book class with entity field Chapter which has a CascadeType.ALL property. The Book fields are as follows: @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String bookTitle; @OneToMany(cascade= CascadeType.ALL, fetch= FetchType.EAGER) private List<Chapter> chapters; The Chapter fields are as follows: ... String bookTitle ; @ OneToMany ( cascade = CascadeType . ALL , fetch = FetchType . ...

 
forum_thread

TreeSet and compareTo() issue

Hi I'm trying to use TreeSet but getting NPE on the compareTo() method when it does a find(): ... ( fetch = FetchType . EAGER , cascade = CascadeType . PERSIST ) private ...

 
forum_thread

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

Hi, I can't get this simple test case to work, i know it is probably due to the lack of proper annotations on entities list, could anyone help me to define them? NB in this test case I didn't set all entities methods for the sake of clarity, also in actual application no field are public nor static and no entity is static.    ... ... @ ManyToOne ( cascade = CascadeType . PERSIST ) public ...

 
forum_thread

can't get HashMap out of the database

I'm trying to persist an Entity containing a HashMap. It stores the data in the database OK, but the map is always empty when I get the entity out of the database again. I've reproduced this problem in a simple variation of the Guestbook tutorial: Guest class: ===================== ... ( fetch = FetchType . EAGER , cascade = CascadeType . ALL ) private ... ( fetch = FetchType . EAGER , cascade = CascadeType . ALL ) private ...

 
release

2.3.4

Release date: 2011-11-25 Download (5.49 MB) Binary:  objectdb-2.3.4.zip You should start by following a  tutorial or reading the manual ...

 
forum_thread

EntityManagerFactory Fails To Swtich Over To Slave When Master Is Unavailable

I have a simple task to validate the sample code will switch over to the slave database when the master is unavailable. I simulate the master unavailable by stopping the master server; which generates the following exception below. What am I doing wrong? It appears the connection manager fails to try the second URL in the list: objectdb://10.9.2.15:9998//10.9.2.15:9999/test.odb;user=admin;password=password Thank you in advance. ... = "false" / > <cascade - persist always = "auto" on - persist = "false" ... = "false" / > <cascade - persist always = "auto" on - persist = "false" ...

 
forum_thread

Remove not working

Hello! We have a strange problem. ... com.objectdb.o.TVS.j(TVS.java:169) at com.objectdb.o.TVS.cascade(TVS.java:156) at com.objectdb.o.TVS.g(TVS.java:105) at ... @ OneToMany ( mappedBy = "a" , cascade = CascadeType . REMOVE ) private ...

 
release

2.3.3

Release date: 2011-11-10 Download (5.49 MB) Binary:  objectdb-2.3.3.zip You should start by following a  tutorial or reading the manual ...

 
forum_thread

Updating Entities

Hello, I'm currently writing a program using JavaFX and ObjectDB and I'm encountering a problem with Entities not sending their updates to each other. I have two Entities in question at the moment: Employee and Paygrade. ... How do I ensure that any changes done to paygradeDB cascade into employeeDB? edit ... databases when there is a modification made that needs to cascade throughout the entire application. I don't want to tell my ...

 
forum_thread

Problem with @Basic(fetch = FetchType.LAZY)

I have a class where two fields are annotated with @Basic(fetch = FetchType.LAZY) due to them containing quite long Strings and me loading ALL entities of the database on application startup (swing app) This class should hopefully demonstrate the problem: ... ( fetch = FetchType . LAZY , cascade = CascadeType . ALL ) private ... ( fetch = FetchType . LAZY , cascade = CascadeType . ALL ) private ...