"Invalid property value" error

Posts   
 
    
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 07-Jan-2006 21:55:47   

I am trying to use design-time data-binding for an EntityCollection and I consistently get a strange error. To re-produce the error: 1- Bind the first TextBox to a property from the EntityCollection 2- Try to bind the second TextBox to any property from the collection and Studio's designer throws an error dialog "Invalid property value". The error dialog has a Details button that explains the cause of the error: "No value at index 0."

The strange thing is that I only get this error with one type entity (HREmployee) but binding works fine with the other entities I tested. I tried to re-generate the DAL with no lcuk. I have no custom code in the DAL so I have no idea why is this happening. One thing that does distinguish this entity is that it is a very expensive entity (related to at least 12 other entitties) and some of its related entities are onet-to-one related entities.

sparmar2000 avatar
Posts: 341
Joined: 30-Nov-2003
# Posted on: 08-Jan-2006 17:59:45   

Hmmm very strange. Omar, what version of LLBL runtime are you using. And also can you provide some more inormation about the relationship this entity...just enought to recreate the problem here?

Thanks

omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 08-Jan-2006 19:07:21   

I am using the 22-dec-2005 version. The entity in question is special because it is participating in both one-to-many and many-to-one relations (it is on the many side of some relations and on the one side of other relations). I posted another thread on this forum concerning the same issue and how to re-create the problem. I really hope to resolve this issue soon ...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 09-Jan-2006 11:47:18   

Are you trying to bind a non-string property to the textbox' text property?

Frans Bouma | Lead developer LLBLGen Pro
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 09-Jan-2006 12:55:36   

Otis wrote:

Are you trying to bind a non-string property to the textbox' text property?

No.. actually This behaviour is repeatable. I even created a new database that only has three tables (TableA --1-to-n--> TableB --1-to-n--> TableC). If I generate DAL for this database and then try to build a simple WinForm that has two textboxes. If I drag an entityCollection to bind (TableB) in this WinForm; I am only able to do one binding (the first binding) and then if I try to bind any TextBox to any property in TableB's colleciton I get the error mentioned here (TableA and TableC are OK). I posted another thread about this issue in this forum also. My investigating this issue so far showed that this behaviour only happens for Entities that are on the PK side of one or more relation and also are on the FK side of one or more other relations.

Example: Nationality --> Employee --> EmployeeLeaves

Relations

Nationality.Id (PK) --> Employee.NationalityId (FK) Employee.Id (PK) --> EmployeeLeaves.EmployeeId (FK)

When I try to bind a WinForm for (Employee) I can only bind one of EmployeeEntity's properties at design time and then I get the above-mentioned error If I try to bind any other property .

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 09-Jan-2006 13:55:50   

Ok, please see your other thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=5105

It's a bug which was fixed on 23-dec.

Frans Bouma | Lead developer LLBLGen Pro