Database with no entities, EntityType not found

Posts   
 
    
Posts: 6
Joined: 12-Jul-2006
# Posted on: 11-Sep-2007 10:33:19   

When generating code for a database excluding all tables (just a Service Broker database with a Stored Procedure), the generated code isn't working. The "EntityFactories.cs" file is full of errors, since there is no "EntityType" ("ConstantsEnums.cs" is empty, except for some regions).

Am I doing something wrong, or is this a bug?

I'm using LLBLGen 2.5, August 28th.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 11-Sep-2007 10:38:22   

A template bug I think. There should be a TDL statement which checks for the presence of entities. I'll check it out.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 12-Sep-2007 11:56:22   

Fixed in next build.

Till then: Templates\SharedTemplates\Net2.x\C#\entityFactoriesAdapter.template -> surround the top class there (EntityFactoryBase2) with: <[If HasEntities]> //class here <[EndIf]>

Frans Bouma | Lead developer LLBLGen Pro
jturpin
User
Posts: 20
Joined: 30-May-2007
# Posted on: 26-Sep-2007 20:31:08   

Otis, where do new builds go? I'm logged in looking at all of the downloads for 2.5 and I don't see anything mentioning builds. Is the final version download what's updated?

Just wondering, I don't feel like updating the template myself (I'd rather have the team download the update than do it manually).

Thanks, Jason

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 27-Sep-2007 09:49:12   

jturpin wrote:

Otis, where do new builds go? I'm logged in looking at all of the downloads for 2.5 and I don't see anything mentioning builds. Is the final version download what's updated?

Just wondering, I don't feel like updating the template myself (I'd rather have the team download the update than do it manually).

Thanks, Jason

When a new build is made, we update the downloads in the customer area: the installer is always updated, and also the .zip with the part which was updated, e.g. templates, runtime libraries etc.

So when a fix in the templates was released, you can either download the full installer, or download the latest templates archive from the v2.5 downloads.

Frans Bouma | Lead developer LLBLGen Pro
jturpin
User
Posts: 20
Joined: 30-May-2007
# Posted on: 01-Oct-2007 15:54:55   

I'm still getting this error using the Sep. 24, 2007 full installer in this environment: 1. ODP 10 drivers 2. Stored procedures only (action and retrieval), no entities in this project 3. Issue is occurring with non-DB specific project (DBSpecific project builds just with no problems). 4. C# is the target language. 5. I'm just loading up the generated projects and attempting to build them. They are failing at this point, prior to being added to the main project (a validation build of sorts).

It was mentioned before that this is an issue with the ConstantsEnum file. Here's the entire contents of the ConstantsEnum.cs (I trimmed out some extra line breaks):


///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 2.5
// Code is generated on: Monday, October 01, 2007 8:32:21 AM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;

namespace RGA.eWarp.Data.Generated.GARE
{

    #region Custom ConstantsEnums Code
    
    // __LLBLGENPRO_USER_CODE_REGION_START CustomUserConstants
    // __LLBLGENPRO_USER_CODE_REGION_END
    
    #endregion

    #region Included code

    #endregion
}


// empty namespace declarations
namespace RGA.eWarp.Data.Generated.GARE.EntityClasses
{
}

Just letting you know.

Thanks, Jason

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 01-Oct-2007 17:26:43   

This is our fault flushed . We did fix it, but we didn't log a remark in the change log system, which triggers flags for the various elements to build. So the 'templates' component wasn't flagged as changed, and no new code was checked out for the build, the previous set was used. So the build used that set instead of the newer one as it didn't know there was an updated version.

You can make the template change yourself, please my post above, so you don't have to wait till the next build is made (which will have this updated template simple_smile )

Frans Bouma | Lead developer LLBLGen Pro