Yes, I am actively using it. The basic reason is that I have different applications using different and mostly distinct subsets of the DataMap. I could split up the map and that would probably make things simpler, but doing so would be somewhat artificial.
A use case I have had in the past is excluding one particular entity that is an abstract base class and exists only in order to associate lifecycle callbacks will all the other entities which inherit from it. The actual code for that class resides in a different project from the rest of the entities so I never want to generate source for it. I'm not sure if there is a better way to handle that. On Thu, Mar 14, 2013 at 12:52 PM, Michael Gentry <[email protected]>wrote: > Hi John, > > I recently started using cgen, but didn't look at include (or exclude) > entities because I generate the entire model. I'm not entirely certain > they are useful in a typical build cycle/environment which builds entities > from scratch. Is this something you are actively using or just pondering? > If actively using it, what is your use-case? Just curious. Also, I think > a comma-separated list would be fine, too. > > mrg > > > On Thu, Mar 14, 2013 at 12:49 PM, John Huss <[email protected]> wrote: > > > I've been using CGen for a bit and one confusing aspect of it to me was > the > > way you specific which entities to include for generation. I expected a > > simple comma-separated list, but it requires a regular expression. You > can > > sort of make it work like a comma-separated list by using something like > > this: > > > > includeEntities="Customer|Invoice" > > > > The problem is that if you have entites whose names contain these > > substrings, they will also be included - so an entity named InvoiceDetail > > will also be generated. You can avoid it by using this: > > > > includeEntities="Customer|^Invoice$" > > > > While the vertical bar instead of a comma is unintuitive, but passable, > > requiring this syntax is not friendly. > > > > So my questions are: > > > > 1) Are people actually using the reg-ex here for useful, more complex > > things? > > 2) Would it be reasonable to add another mutually-exclusive property that > > just takes a comma-separated list of entity names? > > > > John > > >
