Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Incorrect EntityCollectionTypeName on LLBLGenProDataSource does not throw exception
 

Pages: 1
Bugs & Issues
Incorrect EntityCollectionTypeName on LLBLGenProDataSource does not throw exception
Page:1/1 

  Print all messages in this thread  
Poster Message
trevorg
User



Location:
Canada
Joined on:
15-Nov-2007 19:13:40
Posted:
104 posts
# Posted on: 09-Mar-2010 09:42:15.  
Am I doing something wrong, or is this a subtle bug?

Consider:

Code:
<llblgenpro:LLBLGenProDataSource
ID="llbDataSource"
runat="server"
DataContainerType="EntityCollection"
EntityCollectionTypeName="Talisman.CorpScorecard.Domain.MetricScorecardCollection, Talisman.CorpScorecard.Domain"
LivePersistence="True"
ThrowExceptionOnIllegalFieldInput="true" />

<llblgenpro:LLBLGenProDataSource
ID="llbDataSource"
runat="server"
DataContainerType="EntityCollection"
EntityCollectionTypeName="Talisman.CorpScorecard.Domain.CollectionClasses.MetricScorecardCollection, Talisman.CorpScorecard.Domain"
LivePersistence="true"    
ThrowExceptionOnIllegalFieldInput="True" />


The first declaration is missing the .CollectionClasses, and when bound to a GridView, ie:
Code:
<asp:GridView ID="gridMain" runat="server"ID="llbDataSource" EmptyDataText="No data found."


I always just got the output "No Data Found."

When I set tracing "SqlServerDQE" value="4", and do a compare with the correct vs incorrect declaration, with the incorrect declaration, there is no select generated at all. Which I suppose makes sense somewhat, because it is an incorrect declaration.

But I would expect in this situation to get at least a huge runtime error, but there were no complaints at all. Why is that?
  Top
Walaa
Support Team



Location:
Egypt
Joined on:
21-Aug-2005 16:03:48
Posted:
9817 posts
# Posted on: 09-Mar-2010 10:48:00.  
Which LLBLGen runtime library verison/build number are you using?

LLBLGen Training
http://www.linkedin.com/in/walaa
 
Top
trevorg
User



Location:
Canada
Joined on:
15-Nov-2007 19:13:40
Posted:
104 posts
# Posted on: 09-Mar-2010 11:08:36.  
2.6 Final. I'm quite sure I'm working with the most latest downloaded libraries.

I should note how I came about this bug, which might explain why it's never been encountered before. I've been working with David Elizondo on LLB templates for ascx controls, and I missed the .CollectionClasses in one of the templates. Someone just dropping a LLB data control onto a form would never encounter this situation.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
27585 posts
# Posted on: 09-Mar-2010 13:59:02.  
It doesn't throw an exception indeed, it silently ignores the type. It's been this way for a long time, and although I can find back the point when we wrote the code, I can't find back the reason why it doesn't throw an exception in the current code, other than I find it logical it doesn't throw an exception because it's possible to set the collection at runtime, plus it might be the case that there's no type set yet during design time which causes the designer to show an area which threw an exception, instead of the control itself.

So I'm a little reluctant to make a change in this area, although I understand it might be a problem to track down.



Frans Bouma
LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
trevorg
User



Location:
Canada
Joined on:
15-Nov-2007 19:13:40
Posted:
104 posts
# Posted on: 09-Mar-2010 17:53:43.  
I can see it not throwing an exception if no type is set, that makes sense to me, but if an invalid type has been specified, I can't see how this wouldn't be considered worthy of an exception.

I doubt many people encounter this situation, but when it happens to you, it makes you think you are starting to go insane.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
27585 posts
# Posted on: 10-Mar-2010 16:34:05.  
I see your point, yet it's still a breaking change (as for example currently a page works properly if the collection type is wrong (or in adapter, the factory) however the developer has set the entity collection property to a valid instance.

So we'll add the exception throwing to v3, and document the breaking change.


Frans Bouma
LLBLGen Pro Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.