The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Generated code fails to compile

Last post 08-18-2008, 12:24 PM by Mike.Griffin. 4 replies.
Sort Posts: Previous Next
  •  08-18-2008, 9:18 AM 10795

    Generated code fails to compile

    Hi,

     I am evaluating your product and have hit a small problem. The generated code fails to compile. I am using the Oracle client with support for LINQ turned on (this is the main reason I am looking at EntitySpaces). In one of the generated files I get the error, "Error 11 'atk.ls.WcfEntitySpaces.BusinessObjects.esSecondaryContainment' does not contain a definition for '_UpToChamberByChamberId' and no extension method '_UpToChamberByChamberId' accepting a first argument of type 'atk.ls.WcfEntitySpaces.BusinessObjects.esSecondaryContainment' could be found (are you missing a using directive or an assembly reference?)". The table in question has the following definition:


    Name                                      Null?    Type
    ----------------------------------------- -------- ----------------------------
    GEO_AREA_ID                               NOT NULL VARCHAR2(8)
    CHAMBER_ID                                NOT NULL NUMBER(38)
    CONTAINER_ID                              NOT NULL NUMBER(38)
    HUMIDITY_SETPOINT_PCT                              NUMBER(38)
    UPPER_HUMIDITY_LIMIT                               NUMBER(38)
    LOWER_HUMIDITY_LIMIT                               NUMBER(38)
    CONTAINER_TYPE_ID                                  NUMBER(38)

    The error occurs twice, once in the GeoAreaId setter and once in the ChamberId setter. Here is the relavant code.

    Code:
    1    		/// <summary>
    2    		/// Maps to SECONDARY_CONTAINMENT.GEO_AREA_ID
    3    		/// </summary>
    4    		virtual public System.String GeoAreaId
    5    		{
    6    			get
    7    			{
    8    				return base.GetSystemString(SecondaryContainmentMetadata.ColumnNames.GeoAreaId);
    9    			}
    10   			
    11   			set
    12   			{
    13   				if(base.SetSystemString(SecondaryContainmentMetadata.ColumnNames.GeoAreaId, value))
    14   				{
    15   					this.MarkFieldAsModified(SecondaryContainmentMetadata.ColumnNames.GeoAreaId);
    16   					this._UpToChamberByChamberId = null;
    17   				}
    18   			}
    19   		}
    20   		
    21   		/// <summary>
    22   		/// Maps to SECONDARY_CONTAINMENT.CHAMBER_ID
    23   		/// </summary>
    24   		virtual public System.Decimal? ChamberId
    25   		{
    26   			get
    27   			{
    28   				return base.GetSystemDecimal(SecondaryContainmentMetadata.ColumnNames.ChamberId);
    29   			}
    30   			
    31   			set
    32   			{
    33   				if(base.SetSystemDecimal(SecondaryContainmentMetadata.ColumnNames.ChamberId, value))
    34   				{
    35   					this.MarkFieldAsModified(SecondaryContainmentMetadata.ColumnNames.ChamberId);
    36   					this._UpToChamberByChamberId = null;
    37   				}
    38   			}
    39 		}
    

     

    The errors occur on lines 16 and 36. This seems like a bug to me.

     Any ideas?

    Thanks,

     Mike


    Jack of all trades
    Master of none
  •  08-18-2008, 9:34 AM 10797 in reply to 10795

    Re: Generated code fails to compile

    If you leave the "Generate Hierarchical Model" checkbox checked then you really need to generate all of your tables at once. Otherwise, just turn it off and do a few tables and play with EntitySpaces.  I'm not sure OracleClient even supports LINQ though?
    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  08-18-2008, 10:02 AM 10801 in reply to 10797

    Re: Generated code fails to compile

    I did generate all of my tables at once with the "Generate Hierarchical Model" checked. I am looking at this because of a post to the Oracle forums with the home EntitySpaces URL claiming to support LINQ to Oracle. If that isn't the case, then I don't need to proceed with the evaluation.

     So does EntitySpoaces support LINQ to Oracle?

     Thanks,

    Mike

     


    Jack of all trades
    Master of none
  •  08-18-2008, 10:12 AM 10802 in reply to 10801

    Re: Generated code fails to compile

    EntitySpaces supports LINQ through the native vendor providers. So perhaps they have added LINQ to Oracle Client in VS2008 SP1? I'm not sure but I will see if this is the case. If not, and you need LINQ on Oracle then LLBLGen is your bet, however, our Dynamic Query API which I find easier to understand does work on Oracle.
    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  08-18-2008, 12:24 PM 10805 in reply to 10802

    Re: Generated code fails to compile

    I checked, as far as I can tell LINQ isn't supported in OracleClient. LLBLGen will allow you to use the LINQ syntax and it will convert it to it's older query syntax then execute the query. Just an FYI ...

    EntitySpaces | Twitter | BLOG | Please honor our Software License
View as RSS news feed in XML