Add a field name in MyTableFields class

Posts   
 
    
imakimak
User
Posts: 62
Joined: 18-Mar-2010
# Posted on: 13-Oct-2010 22:02:40   

Hi,

I needed a field calling DBFunction while doing a GetMulti on MyTableCollection. For that I extended MyTableEntityFactory and override CreateFields method and then also added a property in MyTableEntity. Now I also want to have this field available in the MyTableFields class, however I am not sure if I can modify this class as its been overwritten by code is generated from LLBL Studio. I can always create a partial class but wondering if there is any other way of doing it?

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Oct-2010 03:44:27   

Hi imakimak,

You can't do that, as that is a generated class and it also have an enum. If you force a new value in Fields, that would break working generated code. Remember that your custom field only have meaning when you fetch.

What do you wan that btw?

David Elizondo | LLBLGen Support Team
imakimak
User
Posts: 62
Joined: 18-Mar-2010
# Posted on: 14-Oct-2010 15:29:18   

Well I basically need to add a field during call to GetMulti for a collection. This field will contain DBFunction. With the suggestion you provided at http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=16550&HighLight=1 I have modifed the factory and added a property into the entity field itself. The only thing is that I want to refer to this newly added field name which is not accessible in the field names enum. I was just wondering how can I do that.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 14-Oct-2010 21:41:53   

Would it be easier to create a view on the table, with the function value in an additional field, and then map an entity to that view, rather than trying to bend LLBLGen to do something it's not really designed for...?

Matt