Retrieve Table name form Entity

Posts   
 
    
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 08-Jul-2005 16:54:44   

Is there a way to retrieve the table name of an entity? Like I can do to retrive field names:

 EntityFieldFactory.Create(GroupFieldIndex.Name).Name

Thanks,

Fishy

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 08-Jul-2005 20:58:18   

In selfservicing this is entity.Fields(index).SourceObjectName (VB.NET), in adapter, you have to derive a class from DataAccessAdapter and call GetFieldPersistenceInfo() by passing in the name of the entity. Then grab the first fieldpersistenceinfo object and return SourceObjectName

Frans Bouma | Lead developer LLBLGen Pro
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 08-Jul-2005 21:20:03   

Is there a way to get the Entity Name?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 08-Jul-2005 21:47:06   

Fishy wrote:

Is there a way to get the Entity Name?

entity.LLBLGenProEntityName though in one overload of the GetFieldPersistenceInfos() you can pass in an entity object as well simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 08-Jul-2005 21:59:51   

Thanks simple_smile