0 Replies Latest reply: Dec 17, 2012 7:54 AM by 980303 RSS

    UDT Type Mismatch Problem

    980303
      Hi;

      We have a project which has two modules which uses same UDTs. We have generated UDT's shown in example code. When our project calls B's SP which should return UDT from B.DbObjects namespace, the returned type is A.DbObjects namespace. This occurs because Oracle Data Access gets type name from OracleCustomTypeMappingAttribute and creates instance with that value. Since the namespaces are different, we cannot bind data to our return type. Is there a solution for this?

      Code:

      ///Module A - Output A.dll
      namespace A.DbObjects
      {
      [OracleCustomTypeMapping("SCHEMA.UDTNAME")]
      public partial class UDTNAME : OracleCustomType
      {
      [OracleObjectMappingAttribute("X")]
      public string X { get; set; }
      [OracleObjectMappingAttribute("Y")]
      public decimal Y { get; set; }
      [OracleObjectMappingAttribute("Z")]
      public decimal Z { get; set; }
      }
      }

      ///Module B - Output B.dll
      namespace B.DbObjects
      {
      [OracleCustomTypeMapping("SCHEMA.UDTNAME")]
      public partial class UDTNAME : OracleCustomType
      {
      [OracleObjectMappingAttribute("X")]
      public string X { get; set; }
      [OracleObjectMappingAttribute("Y")]
      public decimal Y { get; set; }
      [OracleObjectMappingAttribute("Z")]
      public decimal Z { get; set; }
      }
      }