AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

List of properties in LastAudit is empty on updates #445

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
using (var context = new PrvDataContext())
{
    var mentorOffer = context.MentorOffer.GetByKey(mentorOfferId);
    mentorOffer.MentorOfferStartDate = DateTime.Parse(TextBoxStartDate.Text);
    mentorOffer.MentorOfferEndDate = DateTime.Parse(TextBoxEndDate.Text);

    context.SubmitChanges();

    foreach (AuditEntity lastEntity in context.LastAudit.Entities)
    {    
        foreach (AuditProperty lastProperty in lastEntity.Properties)
        {  
        //This code is never reached on updates (works fine on inserts and deletes)
        string originalValue = lastProperty.Original.ToString();
        string currentValue = lastProperty.Current.ToString();
        string propertyName = lastProperty.Name;
            ...
        }
    }
}

What is the expected output? What do you see instead?
I would expect context.LastAudit.Entities[0].Properties to contain a list of 
properties, but the list is empty (Count = 0)

What version of the product are you using?
5.0.0.1687

Please provide any additional information below.
Please note that this works perfect for inserts and deletes.

Original issue reported on code.google.com by karb...@gmail.com on 5 Jul 2010 at 9:37

GoogleCodeExporter commented 9 years ago
Please provide more information so we can help debug.  A small sample of the 
schema and code would be great.  You can send it to support@codesmithtools.com.

Original comment by paul.wel...@gmail.com on 7 Jul 2010 at 1:25

GoogleCodeExporter commented 9 years ago
Please take a look at issue 487. It might be the same problem.

Original comment by karb...@gmail.com on 27 Aug 2010 at 7:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
confirmed fixed in r2017 (Plinqo 5.0.4)

Original comment by stafford...@gmail.com on 29 Aug 2012 at 10:50

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 29 Aug 2012 at 1:15