[Mono-bugs] [Bug 469221] New: ObjectDataSourceView ExecuteSelect method return a Collection with zero elements if the select method returns a single instance

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jan 25 03:47:20 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=469221


           Summary: ObjectDataSourceView ExecuteSelect method return a
                    Collection with zero elements if the select method
                    returns a single instance
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.0.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: priojas at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.9.0.5)
Gecko/2008120122 Firefox/3.0.5 (.NET CLR 3.5.30729)

The ExecuteSelect method is supposed to return a collection with a single
element when the result of the select method is a single instance like it was
in the MONO 1.9.1 version.

The problem seems to be in the file ObjectDataSourceView in the lines 773 - 776

the code there is:

    if (result is IEnumerable)
                return (IEnumerable) result;
            else
                return new object[] {};

and it should be maybe something like this:

    if (result is IEnumerable)
                return (IEnumerable) result;
            else
                return new object[] { result };


Reproducible: Always

Steps to Reproduce:
0. Create an Empty Web Application 
1. Put a Formview inside a webform.
2. Put an ObjectDataSource to retrieve the data from any datasource 
3. Create a class with an static method that return a single instance of some
entity.
4. asociate the Formview to the ObjectDataSource using the DataSourceId
Property in the aspx markup
5. fill the ItemTemplate of the Formview with the required template to show the
fields of the entity you are retrieving.
6. compile it in Mono 2.0.x
7. publish the code using XSP2 
8. point your browser to WebForm you created.


Actual Results:  
Nothing is render inside the formview

Expected Results:  
The formview should render any of the templates according to the current
FormViewMode.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list