nhibernate « SQL « JPA Q&A





1. Hibernate NHibernate - Native SQL    stackoverflow.com

Trying to delete an unmapped class/record via the NHibernate sql api. But can't seem to get it working. Does anything look wrong with this?

session = NHibernateHelper.GetCurrentSession();

       ...

2. HQL to SQL converter    stackoverflow.com

Does anyone know how to convert NHibernate HQL to SQL Scripts?

3. Escape SQL Parameter    stackoverflow.com

I need to work around an NHibernate bug I reported here. Essentially, NHibernate will generate multiple SQL parameters for the same HQL parameter, which results in problems for queries ...

4. Nhibernate fires SQL commands    stackoverflow.com

when updating an entity A, NHibernate also send an SQL update command for some other entity B. A and B are not related. Just before saving entity A, the parent of ...

5. Does Nhibernate 3.0 QueryOver handle SQL injections properly?    stackoverflow.com

I know it's based off HQL so is it just using the same mechanisms that SetString, etc use?

6. Token offset sql error NHIBERNATE    stackoverflow.com

I have this table: TABLE "Set": [PK:IdSet (int), IdProject (int),IdSetState(int),IdPriority(int),NumSet(int),Unit(nchar),NumDisc(int)] And using NUnit testing. this is my test method:

[Test]
        public void Can_add_Set()
    ...

7. Convert SQL to NHibernate HQL    stackoverflow.com

I should convert to the fallowing SQL-Query to NHibernate HQL (NHibernate 3.2). But I don't know, how I have to translate the FLOOR, DATEDIFF and GETDATE.

SELECT Birthday FROM Person
WHERE 1 = ...