Ignoring attributes of enum and List<T> types, incorrectly managed

Oct 21, 2009 at 2:59 PM

This is my entity with mixed mapped and un mapped attributes

namespace Evalos.Logica.Anomalias

{

    using System;

    using System.Collections.Generic;

    using Evalos.Logica.Personal;

 

    [Serializable]

    public class AnomaliaDestinatario

    {

        private Int32 _Id = 0;                              // mapped

        private string _CodigoUsuario = "";                 // mapped

        private string _Tipo = "";                          // mapped

        private string _CodigoPersona = "";                 // mapped

        private string _CodigoPersonaSupervisor = "";       // mapped

        private string _IncluirEnElCalculo = "";            // mapped

 

 

//// related to Issue 1

        private List<Empleado> _PersonalSubordinado = new List<Empleado>();

 

//// related to Issue 2: private eACModoAgrupacionEnvio _ModoAgrupacion = eACModoAgrupacionEnvio.SinAgrupar;

        private Int32 _ModoAgrupacion = 0;

 

        private string _Nombre = "";

        private string _Email = "";

 

        public Int32 Id

        {

            get { return _Id; }

            set { _Id = value; }

        }

 

        public string CodigoUsuario

        {

            get { return _CodigoUsuario; }

            set { _CodigoUsuario = value; }

        }

 

        public string Tipo

        {

            get { return _Tipo; }

            set { _Tipo = value; }

        }

 

        public string CodigoPersona

        {

            get { return _CodigoPersona; }

            set { _CodigoPersona = value; }

        }

 

        public string CodigoPersonaSupervisor

        {

            get { return _CodigoPersonaSupervisor; }

            set { _CodigoPersonaSupervisor = value; }

        }

 

        public string IncluirEnElCalculo

        {

            get { return _IncluirEnElCalculo; }

            set { _IncluirEnElCalculo = value; }

        }

 

        public List<Empleado> PersonalSubordinado

        {

            get { return _PersonalSubordinado; }

            set { _PersonalSubordinado = value; }

        }

 

//// related to Issue 2: public eACModoAgrupacionEnvio ModoAgrupacion

        public Int32 ModoAgrupacion

        {

            get { return _ModoAgrupacion; }

            set { _ModoAgrupacion = value; }

        }

 

        public string Nombre

        {

            get { return _Nombre; }

            set { _Nombre = value; }

        }

 

        public string Email

        {

            get { return _Email; }

            set { _Email = value; }

        }

    }

}

 

eum.xml

  <Entity type="Evalos:Logica:Anomalias:AnomaliaDestinatario" table="ANOMALIASCONFIGEMPLEADOS">

    <Id field="ACE_ID">

      <Generator name="native">

        <Property name="dbType">Int32</Property>

        <Property name="seed">1</Property>

        <Property name="increment">1</Property>

      </Generator>

    </Id>

 

    <Attribute name="CodigoUsuario" field="ACE_CODUSUARIO" db-type="String" size="50" not-null="false" />

    <Attribute name="Tipo" field="ACE_TIPO" db-type="String" size="1" not-null="false" />

    <Attribute name="CodigoPersona" field="ACE_CODEMPLEADO" db-type="String" size="8" not-null="false" />

    <Attribute name="CodigoPersonaSupervisor" field="ACE_CODEMPLEADOSUPERVISOR" db-type="String" size="8" not-null="false" />

    <Attribute name="IncluirEnElCalculo" field="ACE_INCLUIRENCALCULO" db-type="String" size="1" not-null="false" />

  </Entity>

meta.xml

  <Entity type="Evalos:Logica:Anomalias:AnomaliaDestinatario">

<Attribute name="Nombre" ignore="true" type="String"/>

<Attribute name="Email" ignore="true" type="String"/>

 

<!-- Issue 1: Check 1 -->

<!-- Result: blank property name without value (see quick watch 1) which cannot be instantiated -->

<Attribute name="PersonalSubordinado" ignore="true" type="Object"/>

 

<!-- Issue 1: Check 2 -->

<!-- Result: blank property name without value (see quick watch 1) which cannot be instantiated -->

<!—Espected solution: List<Empleado> values -->

<Attribute name="PersonalSubordinado" ignore="true" type="System.Collections.Generic.List`1[Evalos.Logica.Anomalias.AnomaliaDestinatario]"/>

 

<!-- Issue 2: Check 1 -->

<!-- Result: int value -->

<Attribute name="ModoAgrupacion" ignore="true" type="Int32"/>

 

<!-- Issue 2: Check 2 -->

<!-- Result: exception -->

<!-- Espected solutuion: eACModoAgrupacionEnvio -->

<Attribute name="ModoAgrupacion" ignore="true" type="Evalos.Logica.Anomalias.eACModoAgrupacionEnvio"/>

 

  </Entity>

Issue 1, Quick watch 1 (of lstData)

string constraint = string.Format("[CodigoUsuario = '{0}']", CodigoUsuario);

 

List<AnomaliaDestinatario> lstData =

oc.Context.Load<AnomaliaDestinatario>(

      typeof(AnomaliaDestinatario),constraint);

return lstData;

-

 

[0]

{AnomaliaDestinatarioProxy}

Evalos.Logica.Anomalias.AnomaliaDestinatario {AnomaliaDestinatarioProxy}

-

+

 

[AnomaliaDestinatarioProxy]

{AnomaliaDestinatarioProxy}

AnomaliaDestinatarioProxy

+

 

 

_CodigoPersona

"46348807"

String

OK

 

 

_CodigoPersonaSupervisor

""

String

OK

 

 

_CodigoUsuario

"USUARIO"

String

OK

 

 

_Email

""

string

OK

 

 

_Id

1

int

OK

 

 

_IncluirEnElCalculo

"S"

string

OK

 

 

_ModoAgrupacion

0

Int

Issue 2

 

 

_Nombre

""

String

OK

 

 

 

 

 

Issue 1

Checks 1-2

 

 

_Tipo

"1"

string

OK

 

 

CodigoPersona

"46348807"

string

OK

 

 

CodigoPersonaSupervisor

""

string

OK

 

 

CodigoUsuario

"USUARIO"

string

OK

 

 

Email

""

string

OK

 

 

Id

1

int

OK

 

 

IncluirEnElCalculo

"S"

string

OK

 

 

ModoAgrupacion

0

Int

Issue 2

 

 

Nombre

""

string

OK

 

 

 

 

 

Issue 1

Checks 1-2

 

 

Tipo

"1"

string

OK

 

? lstData.ToString()

"System.Collections.Generic.List`1[Evalos.Logica.Anomalias.AnomaliaDestinatario]"

Issue 2, Quick watch 2 (of calling)

oc.Context.Load<AnomaliaDestinatario>(

typeof(AnomaliaDestinatario), constraint)                                             

'oc.Context.Load<AnomaliaDestina' produjo una excepción de tipo 'System.NullReferenceException'

System.Collections.Generic.List<Evalos.Logica.Anomalias.AnomaliaDestinatario> {System.NullReferenceException}

 

? typeof(eACModoAgrupacionEnvio).FullName

"Evalos.Logica.Anomalias.eACModoAgrupacionEnvio"

 

Issue 2, Quick watch 2 (of lstData)

-

 

[0]

{AnomaliaDestinatarioProxy}

Evalos.Logica.Anomalias.AnomaliaDestinatario {AnomaliaDestinatarioProxy}

-

+

 

[AnomaliaDestinatarioProxy]

{AnomaliaDestinatarioProxy}

AnomaliaDestinatarioProxy

+

 

 

_CodigoPersona

"46348807"

String

OK

 

 

_CodigoPersonaSupervisor

""

String

OK

 

 

_CodigoUsuario

"USUARIO"

String

OK

 

 

_Email

""

string

OK

 

 

_Id

1

int

OK

 

 

_IncluirEnElCalculo

"S"

string

OK

 

 

_ModoAgrupacion

0

Int

Issue 2

Checks 1-2

 

 

_Nombre

""

String

OK

 

 

 

 

 

Issue 1

 

 

_Tipo

"1"

string

OK

 

 

CodigoPersona

"46348807"

string

OK

 

 

CodigoPersonaSupervisor

""

string

OK

 

 

CodigoUsuario

"USUARIO"

string

OK

 

 

Email

""

string

OK

 

 

Id

1

int

OK

 

 

IncluirEnElCalculo

"S"

string

OK

 

 

ModoAgrupacion

0

Int

Issue 1

Checks 1-2

 

 

Nombre

""

string

OK

 

 

 

 

 

Issue 1

 

 

Tipo

"1"

string

OK

 

These checks demonstrate nor string nor int32 types can be supported by ignore attributes.

Any suggestions?

Cheers.

Josep Balague

Coordinator
Oct 21, 2009 at 4:46 PM

Hi,

 

Woo, such a big post. As I told you in another post, if you want to ignore a reference, then it has to be a Reference tag, not an Attribute tag. Moreover, you should not ignore it if you want it to be loaded by EUSS. One last point about references : if you have a list of something, then, in your business model, it has to be an IList<>. In your example, you should have :

public IList<Empleado> PersonalSubordinado

        {

            get { return _PersonalSubordinado; }

            set { _PersonalSubordinado = value; }

        }

if you have a reference to a single object (rather than a list), then the property should be declared virtual. Otherwise, you will never get any data loaded by euss in these references. You really should read the documentation ;).

In the metadata you wrote, you wanted to ignore the attribute PersonalSubordinado. It is because you have no data in it. How could EUSS fill in your property if it is ignored ?

 

However, I'm not sure to understand correctly your troubles with enum. Because I saw nothing about enum in your samples. Could clarify exactly what you have and what you expected (without the debugview, which is for now somehow confusing me) ?

 

Regards,

Nicolas Penin

Oct 22, 2009 at 9:07 AM

Hi Nicolas,

Thanks for your quick answer.

Issue 1

PersonalSubordinado is a non mapped List attribute / reference as you wish say (I really cannot set where the difference is) based on a mapped type and within a mapped object called  AnomaliaDestinatario PersonalSubordinado is an object which must be instantiated but not filled by Load<AnomaliaDestinatario>(this is the reason of ignoring it). After reading short documentation about virtual properties, I have gone a step:

private IList<Empleado> _PersonalSubordinado = new List<Empleado>();

public virtual IList<Empleado> PersonalSubordinado

{

       get { return _PersonalSubordinado; }

       set { _PersonalSubordinado = value; }

}

 

IList<AnomaliaDestinatario> lstData;

lstData = oc.Context.Load<AnomaliaDestinatario>(typeof(AnomaliaDestinatario), “”);

 

meta.xml

<Reference name="PersonalSubordinado" type="Evaluant.Uss.ObjectContext.IPersistableCollection`1[[Evalos.Logica.Personal.Empleado]]" ignore="true"/> 

 

? lstData[0].PersonalSubordinado.GetType().FullName

"Evaluant.Uss.ObjectContext.IPersistableCollection`1[[Evalos.Logica.Personal.Empleado, DigitekLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"

? lstData[0].PersonalSubordinado.Count()

'lstData[0].PersonalSubordinado.Count()' produjo una excepción de tipo 'Evaluant.Uss.UniversalStorageException'

    base {System.Exception}: {"The reference mapping PersonalSubordinado not found"}

What I really need in this issue is a list of AnomaliaDestinatario objects with a 0 length PersonalSubordinado list in every instance.

Issue 2

I never use int32 in scenarios where options can be multiple but I store an int32 value in data base. In my previous message when I use public Int32 ModoAgrupacion instead of public eACModoAgrupacionEnvio ModoAgrupacion  I get a null exception in Load method. public Int32 ModoAgrupacion works fine, but not public eACModoAgrupacionEnvio ModoAgrupacion

Suggestions about documentation:

  • A dictionary of Evaluant concepts should be very useful
  • As Nhibernate has, short projects with examples should be very useful
  • Both your colleage Sebastien and yourself redirected me to read the documentation. Documentation is too much complex from other side :-)

Yours,

Josep Balague

 

<!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Version>12.00</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:RelyOnVML /> <o:AllowPNG /> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>ES</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="--" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:595.3pt 841.9pt; margin:70.85pt 3.0cm 70.85pt 3.0cm; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:349844357; mso-list-type:hybrid; mso-list-template-ids:1342749408 -1961075996 201981955 201981957 201981953 201981955 201981957 201981953 201981955 201981957;} @list l0:level1 {mso-level-start-at:0; mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-18.0pt; font-family:Symbol; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} --><!--[if gte mso 10]> <mce:style><! /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} --> <!--[endif]-->

Hi Nicolas,

Thanks for your quick answer.

Issue 1

PersonalSubordinado is a non mapped List attribute / reference as you wish say (I really cannot set where the difference is) based on a mapped type and within a mapped object called  AnomaliaDestinatario.  PersonalSubordinado is a transient object because it cannot be filled by  Load<AnomaliaDestinatario>. After reading poor documentation about virtual properties, I have gone a step:

private IList<Empleado> _PersonalSubordinado = new List<Empleado>();

public virtual IList<Empleado> PersonalSubordinado

{

       get { return _PersonalSubordinado; }

       set { _PersonalSubordinado = value; }

}

 

IList<AnomaliaDestinatario> lstData;

lstData = oc.Context.Load<AnomaliaDestinatario>(typeof(AnomaliaDestinatario), “”);

 

meta.xml

<Reference name="PersonalSubordinado" type="Evaluant.Uss.ObjectContext.IPersistableCollection`1[[Evalos.Logica.Personal.Empleado]]" ignore="true"/>

 

? lstData[0].PersonalSubordinado.GetType().FullName

"Evaluant.Uss.ObjectContext.IPersistableCollection`1[[Evalos.Logica.Personal.Empleado, DigitekLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"

? lstData[0].PersonalSubordinado.Count()

'lstData[0].PersonalSubordinado.Count()' produjo una excepción de tipo 'Evaluant.Uss.UniversalStorageException'

    base {System.Exception}: {"The reference mapping PersonalSubordinado not found"}

What I really need in this issue is a list of AnomaliaDestinatario with a 0 length PersonalSubordinado list in every instance.

Issue 2

I never use int32 in scenarios where options can be multiple but I store an int32 value in data base. In my previous message when I use public Int32 ModoAgrupacion instead of public eACModoAgrupacionEnvio ModoAgrupacion  I get a null exception in Load method. public Int32 ModoAgrupacion works fine, but not public eACModoAgrupacionEnvio ModoAgrupacion

Suggestions about documentation:

<!--[if !supportLists]-->·         <!--[endif]-->A dictionary of Evaluant concepts should be very useful

<!--[if !supportLists]-->·         <!--[endif]-->As Nhibernate has, short projects with examples should be very useful

<!--[if !supportLists]-->·         <!--[endif]-->Both your colleague Sebastien Ros and yourself redirected me to read documentation. In my opinion this is not an answer. Documentation is too much complex from other side J

Yours,

Josep Balague

Coordinator
Oct 22, 2009 at 11:10 AM

Hi,

Issue 1 :

You should get the full type name of an entity you do create manually. so that you could have something like System.Collections.Generic.IList`1[[Evalos.Logica.Personal.Empleado]]. The type declared in metadata has to be the type you have in your model. In your case an IList<Evalos.Logica.Personal.Empleado>.

An attribute is a primitive type (string, int, double, byte, ...). A reference is a property which type is either a class of your model (the property then has to be virtual) or a IList<T> where T is a class of your model (the property does not need to be virtual, but needs to be an IList<>). If you do not want your reference to be known by euss, just have your property of type List<Evalos.Logica.Personal.Empleado> and do not specify anything in the metadata.

 

Regards,

Nicolas Penin