Coder Social home page Coder Social logo

@UniqueID error about dapper HOT 7 OPEN

berets76 avatar berets76 commented on May 23, 2024
@UniqueID error

from dapper.

Comments (7)

mgravell avatar mgravell commented on May 23, 2024 1

All the deep. There are some ways of configuring this, but honestly: in most cases it is more pragmatic just to:

new { obj.Foo, obj.Bar, obj.Blap }

to explicitly call out the things you want.

This is an interesting scenario, though. I wonder whether we could do something over in AOT-land to specify better restriction rules (in the AOT work, we have much better analysis tooling, and better ways of specifying configuration)

from dapper.

mgravell avatar mgravell commented on May 23, 2024 1

I'm going to refer to the Apache license to answer that:

Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

If it works, great! I feel comfortable using it, as long as I have integration tests working.

from dapper.

mgravell avatar mgravell commented on May 23, 2024

Can we see how you're invoking the SQL? Including (and in particular) the parameters? I can't do much without seeing the usage.

from dapper.

mgravell avatar mgravell commented on May 23, 2024

I wonder, in particular, whether you somehow have a @uniqueId and @UniqueId (or similar), leading to this.

from dapper.

mgravell avatar mgravell commented on May 23, 2024

In this example, Model is what defined the parameters. So: can we see the type that describes Model ? In particular, anything even remotely relating to unique id - regardless of kind (property, field, etc) or accessibility (public, private, etc)

from dapper.

berets76 avatar berets76 commented on May 23, 2024

Sorry I accidentally deleted previous comment.

Basically

using IDbConnection connection = new ConnectionFactory().CreateSQL();

if (connection != null)
{
    connection.Open();
    var result = connection.ExecuteScalar(UPDATE_QUERY, Model);

Model is the class with UniqueID field

Checking the Model class maybe I found the problem: my partial class has this signature
public partial class pro_ordine_composizione : GanttTask, INotifyPropertyChanged

in the Telerik.Windows.Controls.GanttView.GanttTask there is another uniqueid property.

So, I've my base class

public partial class pro_ordine_composizione 
{
	
	private string? _UniqueID;
	public string? UniqueID { get => _UniqueID; set { if (_UniqueID != value) { _UniqueID = value; OnPropertyChanged();} } }

my partial (with non relevant things)

public partial class pro_ordine_composizione : GanttTask, INotifyPropertyChanged

and finally the GanttTask

[Serializable]
public class GanttTask : PropertyChangedBase, IGanttTask, IDateRange, IResourceContainer, IHierarchical, IStateProvider, IMilestone, ISummary, IEditableHierarchical, IDependant
{
    private ObservableCollection<IResource> resources;

    private DateTime start;

    private DateTime end;

    private string title = string.Empty;

    private string description = string.Empty;

    private double progress;

    private DateTime? deadLine;

    private bool isExpired;

    private bool isExpiredUpdate = true;

    private bool isMilestone;

    private string uniqueId;

Maybe is this the problem ? But Dapper how deep goes to add parameters ?

from dapper.

berets76 avatar berets76 commented on May 23, 2024

I've already tested AOT with a part of our software (with good results), when do you think it might be "safe" to switch prod environment to AOT ?

from dapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.