Generate for single entity (or sub-set of entities)

Posts   
 
    
dtkujawski avatar
dtkujawski
User
Posts: 39
Joined: 05-Jul-2007
# Posted on: 09-Jan-2009 00:40:59   

Is it possible to generate LLBLGen for a single entity (or a small number of entities) within the project?

If I use the "Create participating object subset" feature on the Generate menu, it is ALMOST what I want. However, there are some class files (like: DaoFactory.cs and ConstantsEnum.cs) which will be overwritten with just that one entity in the subset (effectively breaking the build for all the other entities).

The reason I ask is because we have a lot of tables, and regenerating tends to take some significant amount of time. If a developer were able to only generate for the tables that they are changing - they could interate through tier development process more efficiently.

Thoughts?

Thanks in advance... -Dave

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 09-Jan-2009 04:19:39   

Hi Dave,

I would recommend you to use CommandLineGenerator, available when you download the RuntimeLibraries SourceCode from Customer's area. With this, you can automate the generation process and maybe experimet some speed (http://llblgen.com/TinyForum/Messages.aspx?ThreadID=8331&StartAtMessage=0&#46528).

Using "Participating object subset" wont work because there're tasks that must be executed always (PersintenceInfo, for instance).

You also could create a custom preset where you disable tasks that are not needed (or not needed on every generation process). For instance: ValidatorClassesGenerator task.

Also, in a large database as yours, it's often the case that there are groups of tables, not one big schema, so create one .lgp file (LLBLGen Pro project) on each table group. Of course having relations between them is hten not possible, so you have to make sure this is something you can use in your case.

How much it takes to generate code? (and how much is much? simple_smile )

(Edit) I made a mistake, the CliGenerator is in the SDK. The SDK is downloadable from the customer area (Downloads for v2.6 -> Extras -> LLBLGen Pro SDK).

David Elizondo | LLBLGen Support Team