NHibernate: Stored procedure parameter issue

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
vatirim
Posts: 2
Joined: Fri 12 Oct 2012 09:01

NHibernate: Stored procedure parameter issue

Post by vatirim » Fri 12 Oct 2012 09:21

Using Entity Developer 4.7 with NHibernate 3.3.1 and SQL Server 2008 (dialect=NHibernate.Dialect.MsSql2008Dialect) I want to call stored procedures.
The generated command in the <sql-query> element of the hbm.xml file contains a call syntax which is not accepted by NHibernate.
I get sth like this:

Code: Select all

exec dbo.MyProc(:Param1, :Param2)
I would expect a syntax without parentheses.
NHibernate returns an error like this:

Code: Select all

[SQL: exec dbo.MyProc(@p0, @p1)] ---> System.Data.SqlClient.SqlException: Incorrect syntax near '@p0'.
What am I doing wrong?

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: NHibernate: Stored procedure parameter issue

Post by Shalex » Tue 16 Oct 2012 09:22

We have reproduced and are investigating the issue. We will post here about the results.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: NHibernate: Stored procedure parameter issue

Post by Shalex » Wed 17 Oct 2012 09:19

The bug with generating SQL for invoking stored procedure is fixed. We will post here when the corresponding build of Entity Developer is available for download.

As a workaround, please switch to the SQL execution and set a correct syntax manually:

Code: Select all

exec dbo.MyProc :Param1, :Param2

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: NHibernate: Stored procedure parameter issue

Post by Shalex » Thu 18 Oct 2012 16:22

New build of Entity Developer 4.7.285 is available for download!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=25093.

Post Reply