[Hibernate] Re: Mass Deletes

2003-08-04 Thread Chris Nokleberg
[EMAIL PROTECTED] wrote: > But my big problem is: how do we know which _loaded_ objects were deleted? > I don't think there is any good way to do this. All we get back from DELETE > is a row count. How about doing the mass delete, and then building a select statement to see which of the loaded obj

[Hibernate] What does this exception mean?

2003-08-04 Thread jiesheng zhang
Hi, all Caused by: net.sf.hibernate.HibernateException: Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade Any hint what might cause this exception? Thanks jason __ Do you Yahoo!? Yahoo! SiteBuilder - Free

RE: [Hibernate] Mass Deletes

2003-08-04 Thread Patrick Burleson
So the select would be to get the just the IDs affected so Hibernate can figure out if any currently loaded objects need to be marked as deleted? And then a delete to blow the rows away? I like that, as it is more efficient than the Entity Bean model, but allows for object caching in memory. T

[Hibernate] hbm2java patch for generating find methods

2003-08-04 Thread engrean
The following is in the patch. This patch is based on a question I posted earlier today (http://sourceforge.net/forum/forum.php?thread_id=912698&forum_id=128638), but got no bites on. I did have to change the build to work with hibernate-2.0.2 as the build.xml was looking for ../../hibernate-2.0/

[Hibernate] update without loading objects

2003-08-04 Thread Frank Chen
Hi, Does,anybody know whether it is possible to update a table column or columns without retrieve the objects out first? Take following sql as example: 'update employee set bonus=? where title='developer''. I do not want to select all employee objects with developer title out then do update. Does

Re: [Hibernate] JCA RollBack

2003-08-04 Thread Igor Fedorenko
Andy, It's been a while sinse I last looked at this code but as far as I remember there was a way to force JBoss to use the same JCA connection to be used by multiple EJBs participating in the same transaction (if this is what you want). If I am not mistaken, you should specify ejb-resource-re

[Hibernate] JCA RollBack

2003-08-04 Thread Andy Britz
Hi guys, this mail is aimed mainly at Daniel and Igor as I understand they are responsible for the JCA implementation I would like to get some information regarding the JCA adapter and request a possible rollback to an earlier implementation provided by Daniel. Here is a Scenario (mine actual

[Hibernate] [newbye] many-to-many

2003-08-04 Thread Enrico donelli
Hi everybody, I've got a problem with many to many relationship. I read the documentation, but still I can't make the relashionsip work if class A has got a composite key, so with 2 columns as primary keys. The database should be something like TABLE_A --- pk1 pk2 TABLE_B ---

RE: [Hibernate] Mass Deletes

2003-08-04 Thread Odd Moller
Title: RE: [Hibernate] Mass Deletes I don't understand the drawbacks with the select-then-delete alternative. Doesn't it just mean one additional statement to the database? ///Odd Moller -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: den 4 augusti 2003

RE: [Hibernate] Mass Deletes

2003-08-04 Thread Patrick Burleson
I got in on this thread late, but if I understand what people are talking about, the select-then-delete model doesn't work well on large datasets. This is one of the drawbacks to Entity Beans for our organization. Trying doing that model for 10K rows and you quickly see how much that extra statem

Re: [Hibernate] Mass Deletes

2003-08-04 Thread Max Rydahl Andersen
ok, but MS Transact-SQL server does ;) http://www.devguru.com/Technologies/sqlsyntax/quickref/sql_syntax_delete.html Also found some other stuff indicating that some of the other major db's has delete with join features, but there syntax looks very different But it seems true that it does not

RE: [Hibernate] Parent Child and form-based authentication in Tom cat

2003-08-04 Thread EPugh
Title: RE: [Hibernate] Parent Child and form-based authentication in Tom cat  Where you are doing the logic to decide whether to save or update..  Wouldn't you want to do sess.saveOrUpdate(user)? Eric -Original Message- From: Raible, Matt To: '[EMAIL PROTECTED]' Sent: 7/30/03 2:51

Re: [Hibernate] Mass Deletes

2003-08-04 Thread Gavin . King
AFAICT, databases do not support DELETEs with joins |-+> | | Max Rydahl | | | Andersen | | | <[EMAIL PROTECTED]> | | || | | 04/08/03 06

Re: [Hibernate] Mass Deletes

2003-08-04 Thread Max Rydahl Andersen
[EMAIL PROTECTED] wrote: Many users have asked for session.delete("from Foo foo where foo.count=0"); to issue a single SQL DELETE. This is certainly not possible for objects with collections or cascades (though it might not matter if we ignore Lifecycle callback; not sure). For other clas

Re: [Hibernate] Mass Deletes

2003-08-04 Thread Gavin . King
Note that the single problem with this is that objects that _aren't_ actually being deleted (and that might be referenced by the application) are suddenly evicted - and any subsequent modifications are lost. Actually, the disable-when-instances-are-loaded option can almost be used to emulate the

Re: [Hibernate] Mass Deletes

2003-08-04 Thread Gavin . King
Sorry! I thought of that one, but forgot to write it down! Its probably the best option, actually, though less transparent to the user. |-+> | | "Domagoj | | | Jugovich"| | | <[EMAIL PROTE