Thank you very much Ken, that's exactly the case...
in my code i'm using the instance method "CreateSQLQuery()", in your
blog post:

http://www.kenegozi.com/Blog/2006/10/08/projection-using-activerecords-importattribute-and-hqls-select-new-clause.aspx

you used "HqlBasedQuery", i didn't use it because i didn't map all the
tables used in the my sql query to objects. (there are too many of
them)
is there a benefit for using HqlBasedQuery instead "CreateSQLQuery"?
AFAIK they both return typed objects...

On Sep 8, 2:05 pm, "Ken Egozi" <[EMAIL PROTECTED]> wrote:
> my two pence:
>
> should i use projection to bind the grid to the data?
>
> yes.
> Unless your persistable domain objects fits perfectly within the view, which
> is not likely as you describe it as a complex thing, it's advisable to have
> a single query building up the necessary projection for the view.
>
> > if so then how will i unbind the data, update my models and save the
> > changes to the db?
>
> manually. That is - you load, populate and save the domain objects according
> to the given DTO received from the view
>
>
>
> On Mon, Sep 8, 2008 at 9:39 AM, erikash <[EMAIL PROTECTED]> wrote:
>
> > Hi, I've asked this question on the activerecord forums, but i fill
> > that this question may be more relevant here...
> > i'm working on a new project that accesses a legacy database, which i
> > cannot change/refactor.
> > anyway, i have a view which contains a grid that has many columns
> > coming from different tables in th db (and mapped to different objects
> > in my domain layer), and that grid is open for modifications... should
> > i use projection to bind the grid to the data? if so then how will i
> > unbind the data, update my models and save the changes to the db?
>
> > Thanks in advance,
> > Erik.
>
> --
> Ken 
> Egozi.http://www.kenegozi.com/bloghttp://www.musicglue.comhttp://www.castleproject.orghttp://www.gotfriends.co.il
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to