nhibernate « Update « JPA Q&A





1. Does NHibernate interoperate with Hibernate? If not is there a framework out there for both Java and .NET?    stackoverflow.com

Say you had:

  • a database
  • a bunch of .NET Windows GUI programs
  • a bunch of Java web applications
you could use Hibernate for the Java stuff and NHibernate for the .NET stuff - but would ...

2. Executing multiple updates in a single NHibernate HQL statement    stackoverflow.com

I would like to write the following SQL in HQL so it executes as a single statement:

update child_thingy c
set c.parent_thingy_id = null
where c.common_thingy_id = @common_thingy_id

delete
from parent_thingy p
where p.common_thingy_id = @common_thingy_id
I've translated ...

3. NHibernate - Unexpected update wihout explicit update    stackoverflow.com

after a child collection with one item in it gets lazy loaded when performing an SQL select on the parent, an update statement is executed for this child afterwards - without ...

4. Problem with NHibernate and saving - NHibernate doesn't detect changes and uses old values    stackoverflow.com

When I do this:

Cat x = Session.Load<Cat>(123);
x.Name = "fritz";
Session.Flush();
NHibernate detects the change and UPDATEs the DB. But, when I do this:
Cat x = new Cat();
Session.Save(x);
x.Name = "fritz";
Session.Flush();
I get NULL for name, ...

5. saveOrUpdate(Object) method of Hibernate    stackoverflow.com

when i use saveOrUpdate(Object) method of Hibernate. How can I know that row is updated or new row added into table??? Return type of method saveOrUpdate(Object) is void, so am not ...

6. update with join in HQL    stackoverflow.com

I have this request in pure SQL (mySql) which works perfectly : UPDATE index_record_format as dbrf, index_record as dbr SET status = 1 where dbr.record_id = dbrf.record_id I'd like to do the same ...