jonwagner / Insight.Database

Fast, lightweight .NET micro-ORM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQLConstructor using invalid value

delossan opened this issue · comments

Tablename: package

id title packageId
122 title1 102102

SQL statement: select * from package

[SqlConstructor]
    public Package(int id, string title, int packageId)
        : base(id, title, packageId){}

I put a breakpoint on the sqlconstructor and the value for packageId is 1. Any idea why I'm getting a different value instead of the expected value of 102102?

/shrug nothing obvious. should just work.

can you create a branch with a test case that reproduces it? then we can hop in and debug.

Made a change to set the int packageId from nullable to not nullable and it is now working as expected.

What is your whole class? Was the packageId in the object an int? but the one in the constructor an int

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.