Skip to content

Commit

Permalink
Prevent truncation of MARC Leader values during data ingest
Browse files Browse the repository at this point in the history
  • Loading branch information
mlichtenberg committed Jun 28, 2017
1 parent de87971 commit 46caa25
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion BHLImportDataObjects/Concrete/IAMarc.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

#region Using

using CustomDataAccess;
using System;
using System.Data;

#endregion Using

Expand All @@ -10,5 +12,28 @@ namespace MOBOT.BHLImport.DataObjects
[Serializable]
public class IAMarc : __IAMarc
{
}
/// <summary>
/// Override the base Leader property to avoid having the leading spaces
/// trimmed off of the value when the property is set.
/// </summary>
private string _Leader = string.Empty;

[ColumnDefinition("Leader", DbTargetType = SqlDbType.VarChar, Ordinal = 3, CharacterMaxLength = 200)]
public new string Leader
{
get
{
return _Leader;
}
set
{
if (value != null) value = value.Substring(0, (value.Length > 200 ? 200 : value.Length));
if (_Leader != value)
{
_Leader = value;
_IsDirty = true;
}
}
}
}
}

0 comments on commit 46caa25

Please sign in to comment.