Changes in entity.template not showing

Posts   
 
    
Posts: 20
Joined: 02-Oct-2006
# Posted on: 02-Oct-2006 20:14:49   

Changes in entity.template not showing in generated code for Template Studio 2.0.09042006, the adapter based templates, Shared Code , Net2.x, C#

however I am able to add code and have it show in the generated code of entityRelations.template

Both these files reside in my own direrectory to seperate it from the originals, however I have added '//Here!!!' to the entity.template original and that change did not show either.

and the problem continues even if I reboot.

is there some other storage location that it could be pulling entity.template from?

Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 02-Oct-2006 20:30:42   

Hi,

if you use the adapter scenario, entityAdapter.template is the template you should update, entity.template is for selfservicing.

Cheers

Posts: 20
Joined: 02-Oct-2006
# Posted on: 02-Oct-2006 20:47:22   

hmm is there another .template to check? .. that one didn't change anything either

Posts: 20
Joined: 02-Oct-2006
# Posted on: 02-Oct-2006 20:54:25   

it was: derivedEntityAdapter.template that I needed to update.

I get the impression that I missing some concept with the "derived" in its name. Why is the derived in its name?

Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 02-Oct-2006 21:02:52   

Well it depends on what scenario you use really.

entityUsingDerivedAdapter.template if you use derived entities

but the best solution is to find out by yourself:

in the generation form, "task queue to execute" tab (or in the corresponding xml file), look for the task that generate your entities (the filename format should let you know) and corresponding templateid.

then in the second tab "template bindings" or in the corresponding xml files, look for the file corresponding to the templateid

Cheers

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 02-Oct-2006 22:18:26   

The derived... templates are used in the Adapter, two classes preset simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Posts: 20
Joined: 02-Oct-2006
# Posted on: 03-Oct-2006 20:56:48   

This was VERY helpful to me, and I wanted others to have this tidbit as it helped me get a clue as to what was going on.

I made the little batch file below to add add a "//startof <TemplateName>" and a "//endof <TemplateName>" to each template in the directory it is ran in.

The next time you generate you will finnally have a clue where everything is coming from.

Instructions: Create a "Comment.Bat" with this as the text:


@for %%f in (*.template) do (
@echo //startof %%f > %%f_temp
@Type "%%f" >> %%f_temp
@echo //endof %%f >> %%f_temp
@Move /Y "%%f_temp" "%%f"
)

Note: This will also add the comments your "appconfig.template" (and xml does not use '//' to comment) if your using the LLBL created project directly, this will cause problems unless you remove the added lines. This it won't be an issue if you are Refrencing from another Project as it will run using that projects '.config'.

Posts: 20
Joined: 02-Oct-2006
# Posted on: 01-Mar-2007 01:03:34   

also take the comments out of the ProjectFile template