I usually think of a proxy as a placeholder object. Think of it sort of as declaring your object without setting any values on it.
I believe what steve bohlen then means is you set the values on the object and the ID and then persist the changes back to the database and it will only update the record without having to do the select statement. I have never seen an example of this though. A question I would have is how does it know to not set the 15 other propertys on my object that I didn't want to set. For instance if your table has 10 fields, and you just want to ultimate run the following statement: "UPDATE myTable set field1='foo' where field2='test123'", how does it know to not set the rest of the 8 fields to something? On Aug 9, 11:11 am, osman nuri katib <[email protected]> wrote: > what is the "proxy of object"? > does isession.load(..) return an object? > I didn't understand. > > 2010/8/9 sbohlen <[email protected]> > > > > > > > You probably want ISession.Load(object id) > > > ISession.Load(...) returns a proxy of the object that you can then > > update but it does NOT actually query the DB to return actual data > > first (unlike ISession.Get(...) which first queries the DB to retrieve > > the data for the entity). > > > Google a bit for more info on the difference between .Load(...) > > and .Get(...) and you will see examples of this distinction. > > > HTH, > > > -Steve B. > > > On Aug 9, 11:51 am, osman nuri katib <[email protected]> wrote: > > > Hello everybody, > > > I want to update a persistent record in database(MS sql 2008) and ı dont > > > want to select the record. > > > > Is there another way from "session.CreateSqlQuery()" > > > > please help? > > > > thanks.. > > > -- > > 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]<nhusers%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en. > > -- > Osman Nuri KATİB > YTÜ > Bilgisayar Mühendisliği- Hide quoted text - > > - Show quoted text - -- 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.
