Copy and paste fields from one entity into another

Posts   
 
    
NMackay
User
Posts: 138
Joined: 31-Oct-2011
# Posted on: 29-Aug-2013 16:26:17   

Hi,

We have certain audit fields most tables have.

When creating a new entity I have to add these fields, it would be nice to just copy them from another entity and paste them in like you can in other designers I've used in the past.

Is there a way of doing this or another recommended approach?

Thanks, Norman.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 29-Aug-2013 17:42:50   

If you're using v4, you can use field inlining: create a value type with the fields, and then create in an entity a field of the type of the valuetype. At code generation the fields of the value type are inlined for our own framework, so you can more quickly create the fields simple_smile

Frans Bouma | Lead developer LLBLGen Pro
NMackay
User
Posts: 138
Joined: 31-Oct-2011
# Posted on: 29-Aug-2013 18:25:19   

Otis wrote:

If you're using v4, you can use field inlining: create a value type with the fields, and then create in an entity a field of the type of the valuetype. At code generation the fields of the value type are inlined for our own framework, so you can more quickly create the fields simple_smile

Do you still have to create the entity fields and set them to the valuetype?

This is about all I can find on it

https://www.llblgen.com/documentation/4.0/LLBLGen%20Pro%20RTF/ValueTypeInlining.htm

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 29-Aug-2013 20:45:00   

Yes you still have to create the value typed field, but if you have 2 or more fields to add every time, you can save work by creating just one. If you have to add just 1 field, then of course you don't gain anything. In that case, I'd use quickmodel, it's easier / faster to add fields that way:


#u :Customer
Field1 int
Field2 int
#u :Order
Field1 int
Field2 int

etc. (type each line separately)

Frans Bouma | Lead developer LLBLGen Pro
NMackay
User
Posts: 138
Joined: 31-Oct-2011
# Posted on: 30-Aug-2013 10:21:49   

Otis wrote:

Yes you still have to create the value typed field, but if you have 2 or more fields to add every time, you can save work by creating just one. If you have to add just 1 field, then of course you don't gain anything. In that case, I'd use quickmodel, it's easier / faster to add fields that way:


#u :Customer
Field1 int
Field2 int
#u :Order
Field1 int
Field2 int

etc. (type each line separately)

Thanks Frans, I'll use quickmodel.

The copy and paste feature would be cool in a future release, just a nice to have rather than anything else simple_smile