GithubHelp home page GithubHelp logo

Comments (11)

rhmnmbr avatar rhmnmbr commented on May 26, 2024 1

@rhmnmbr83 It is not enough... I just google it: https://stackoverflow.com/questions/17104837/pgsql-error-code-42703-column-does-not-exist

Provide some information, please:

  1. Publish your c# class with attributes
  2. Which method do you use for update?
  3. Publish generated SQL by this library
  4. Publish correct SQL without error for this update
[Table("app_user")]
public class User
{
  [Key, Identity]
  [Column("id")]
  public long Id { get; set; }

  [Column("username")]
  public string Username { get; set; } = string.Empty;

  [Column("password_hash")]
  public byte[]? PasswordHash { get; set; }

  [Column("password_salt")]
  public byte[]? PasswordSalt { get; set; }

  [Column("password_changed_at")]
  public DateTime? PasswordChangedAt { get; set; }

  [Column("name")]
  public string? Name { get; set; }

  [Column("otp")]
  public string? Otp { get; set; }

  [Column("otp_expires_at")]
  public DateTime? OtpExpiresAt { get; set; }

  [Column("role_id")]
  public int RoleId { get; set; }

  [LeftJoin("app_role", "role_id", "id")]
  public Role Role { get; set; } = default!;

  [LeftJoin("b_member", "id", "user_id")]
  public Member Member { get; set; } = default!;

  [Column("created_at")]
  public DateTime CreatedAt { get; set; } = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Local);

  [UpdatedAt]
  [Column("updated_at")]
  public DateTime? UpdateAt { get; set; }
}

image

UPDATE app_user 
SET 
  app_user.username = $1, 
  app_user.password_hash = $2, 
  app_user.password_salt = $3, 
  app_user.password_changed_at = $4, 
  app_user.name = $5, 
  app_user.otp = $6, 
  app_user.otp_expires_at = $7, 
  app_user.role_id = $8, 
  app_user.created_at = $9, 
  app_user.updated_at = $10 
WHERE app_user.id = $11

image
image

from dapper-repositories.

phnx47 avatar phnx47 commented on May 26, 2024 1

I will setup tests first #153, then we find what's wrong.

from dapper-repositories.

phnx47 avatar phnx47 commented on May 26, 2024

@rhmnmbr83 It is not enough... I just google it: https://stackoverflow.com/questions/17104837/pgsql-error-code-42703-column-does-not-exist

Provide some information, please:

  1. Publish your c# class with attributes
  2. Which method do you use for update?
  3. Publish generated SQL by this library
  4. Publish correct SQL without error for this update

from dapper-repositories.

phnx47 avatar phnx47 commented on May 26, 2024

@rhmnmbr Hey, can you check it in v1.25.0?

from dapper-repositories.

rhmnmbr avatar rhmnmbr commented on May 26, 2024

@rhmnmbr Hey, can you check it in v1.25.0?

ok, i will check it soon, thank you

from dapper-repositories.

rhmnmbr avatar rhmnmbr commented on May 26, 2024

image
still error in v1.25.0

from dapper-repositories.

phnx47 avatar phnx47 commented on May 26, 2024

@rhmnmbr Can you reproduce it with a unit test?

from dapper-repositories.

rhmnmbr avatar rhmnmbr commented on May 26, 2024

@rhmnmbr Can you reproduce it with a unit test?

I'm sorry, but I'm currently busy for a while.

from dapper-repositories.

phnx47 avatar phnx47 commented on May 26, 2024

@rhmnmbr Let's close it? Because all current tests are fine. I guess something wrong with your PostgreSQL instance.

from dapper-repositories.

rhmnmbr avatar rhmnmbr commented on May 26, 2024

@rhmnmbr Let's close it? Because all current tests are fine. I guess something wrong with your PostgreSQL instance.

ok, thank you

from dapper-repositories.

phnx47 avatar phnx47 commented on May 26, 2024

Added SQL generation tests - 12353c8.

from dapper-repositories.

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.