Error...INSERTING entity when I access it!

Posts   
 
    
Banane avatar
Banane
User
Posts: 67
Joined: 01-Sep-2004
# Posted on: 08-Jul-2005 22:02:12   

Hi, I'm getting a weird error when I access an entity....

When I access an entity property it is creating it... so when I save it is failing because it creates a new entity.

It was fine with the previous version of LLBLGen pro but with the new one it is failing everywhere in the application.

I'm using selfservicing and the latest copy of llblgen pro

can you help?

THE ERROR


An exception was caught during the execution of an action query: Cannot insert the value NULL into column 'EPEObjectID', table 'MyApp_DEV.dbo.Distribution'; column does not allow nulls. INSERT fails. The statement has been terminated.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception. 

WHAT I'm doing that creates a new Distribution entity


bool bRes = false;
this.EPEObject.DistributionReturnsNewIfNotFound = false;
if( this.EPEObject.Distribution != null )
   bRes = (this.EPEObject.Distribution.DistributionMechanismID == (int)DistributionMechanismLOVCode.MyApp);

thanks

Banane avatar
Banane
User
Posts: 67
Joined: 01-Sep-2004
# Posted on: 08-Jul-2005 22:57:39   

oups forget it ... I found the problem...

tx