Database Fieldname

Posts   
 
    
Sascha
User
Posts: 8
Joined: 12-Feb-2007
# Posted on: 12-Feb-2007 10:04:39   

Hi, how can I retrieve the original Fieldname (from Database) of an Entity-Field? I'm working with adapter.

Greetings Sascha

jbb avatar
jbb
User
Posts: 267
Joined: 29-Nov-2005
# Posted on: 12-Feb-2007 14:44:05   

Hello,

what version of llbl do you use? Do you want to get the fieldname from a fetched entity or in a static way?

Sascha
User
Posts: 8
Joined: 12-Feb-2007
# Posted on: 13-Feb-2007 09:13:46   

Hello, I use LLBLGen 2.0. I want to get the fieldname in a static way.

Thanks for replies.

Sascha

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Feb-2007 09:48:32   

Use the SourceColumnName property for the EntityField object.

Sascha
User
Posts: 8
Joined: 12-Feb-2007
# Posted on: 13-Feb-2007 10:32:09   

Hi, I'm using adapter. The SourceColumnName-Property is not availible. But I solved the this. I write a partial class which extends the DataAccessAdapter-class: public IFieldPersistenceInfo GetFieldPersistenceInfoPublic(IEntityField2 field) { return base.GetFieldPersistenceInfo(field); }

Now I can get the SourceColumnName-Property.

Thanks a lot.

Greetings from Germany and sorry for my terrible english

Sascha

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 13-Feb-2007 10:49:19   

Sascha wrote:

Hi, I'm using adapter. The SourceColumnName-Property is not availible. But I solved the this. I write a partial class which extends the DataAccessAdapter-class: public IFieldPersistenceInfo GetFieldPersistenceInfoPublic(IEntityField2 field) { return base.GetFieldPersistenceInfo(field); }

Now I can get the SourceColumnName-Property.

That's indeed the way to do it in adapter. Adapter has the entity field and persistence info separated so you need to do it this way.

Greetings from Germany and sorry for my terrible english Sascha

Greetings back simple_smile

Frans Bouma | Lead developer LLBLGen Pro