Hi there, 
        
The issue AR-ISSUE-285 was just created by niran pravithana (angos).
        
        Key: AR-ISSUE-285
        Summary: I want to update without select an object.
        Type: Performance
        Importance: High
        
        Description:
        How can I update and object without selecting a record.
For example,
[ActiveRecord(Lazy=true)]
public class AdminUser
{
              ...
}
using (var sess = new Castle.ActiveRecord.SessionScope())
{
 ???????????????var user = 
Castle.ActiveRecord.ActiveRecordMediator<Domain.AdminUser>.FindByPrimaryKey(11);
 //not yet select
 ???????????????user.Username = "Admin"; //select from database
 ???????????????System.Console.WriteLine("SET");
 ???????????????System.Console.ReadLine();
                
Castle.ActiveRecord.ActiveRecordMediator<Domain.BaseUser>.Save(user); //update 
to database
}
System.Console.WriteLine("OK");
System.Console.ReadLine();
I don't want the code to select from database everytime I set value to a 
property, since it effects the performance of the application, how can I write 
the code to just update only some property and leave those remaining untouched?
        
For more, see 
http://support.castleproject.org/projects/AR/issues/view/AR-ISSUE-285
 
        
--
donjon
by Castle Stronghold
http://www.castle-donjon.com


-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" 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/castle-project-devel?hl=en.

Reply via email to