CollectionType
This attribute sets the OracleParameter.CollectionType property value via a class property. Set this to OracleCollectionType.PLSQLAssociativeArray together with ArrayBindSize when binding a PL/SQL associative array (e.g. for array-bind based batch execution).
Attribute
Example usage:
public class Person
{
public int Id { get; set; }
[CollectionType(OracleCollectionType.PLSQLAssociativeArray)]
public string Name { get; set; }
}
Fluent Mapping
To configure via FluentMapper:
FluentMapper
.Entity<Person>()
.PropertyValueAttributes(e => e.Name, new CollectionTypeAttribute(OracleCollectionType.PLSQLAssociativeArray));
Retrieval
Retrieve the attribute via PropertyValueAttributeCache:
var attribute = PropertyValueAttributeCache
.Get<Person>(e => e.Name)?
.FirstOrDefault(e => e.GetType() == typeof(CollectionTypeAttribute));
We strongly recommend using PropertyValueAttributeCache for maximum performance.