Git Product home page Git Product logo

Comments (8)

hacfi avatar hacfi commented on June 2, 2024 1

@braianj Yup, user is a reserved keyword in Postgresql: https://www.postgresql.org/docs/9.6/static/sql-keywords-appendix.html

from easyauditbundle.

ronisaha avatar ronisaha commented on June 2, 2024

Could you please provide some more information. Like:
Symfony version
Php version
EasyAuditBundle version

Best, if you can provide an example project to reproduce the bug.

from easyauditbundle.

braianj avatar braianj commented on June 2, 2024

Hi @ronisaha, here goes some info:

  • PHP v 7.1.11
  • Symfony 3.3.X
  • EasyAuditBundle: ^1.4

And the code is the same as the examples

from easyauditbundle.

ronisaha avatar ronisaha commented on June 2, 2024

Could you also share the entity class. Another question, are you using fos user bundle? If yes which version?

from easyauditbundle.

braianj avatar braianj commented on June 2, 2024

Also comment that i'm using postgreSQL 9.6

This is my entity

<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Xiidea\EasyAuditBundle\Entity\BaseAuditLog;

/**
 * @ORM\Entity
 * @ORM\Table(name="audit_log")
 */
class AuditLog extends BaseAuditLog
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * Type Of Event(Internal Type ID)
     *
     * @var string
     * @ORM\Column(name="type_id", type="string", length=200, nullable=false)
     */
    protected $typeId;

    /**
     * Type Of Event
     *
     * @var string
     * @ORM\Column(name="type", type="string", length=200, nullable=true)
     */
    protected $type;

    /**
     * @var string
     * @ORM\Column(name="description", type="string", length=255, nullable=true)
     */
    protected $description;

    /**
     * Time Of Event
     * @var \DateTime
     * @ORM\Column(name="event_time", type="datetime")
     */
    protected $eventTime;

    /**
     * @var string
     * @ORM\Column(name="user", type="string", length=255)
     */
    protected $user;
   
    /**
     * @var string
     * @ORM\Column(name="impersonatingUser", type="string", length=255)
     */
    protected $impersonatingUser;
    
    /**
     * @var string
     * @ORM\Column(name="ip", type="string", length=20, nullable=true)
     */
    protected $ip;    

}

And in order to make it work I need it to change the column user for user_name (it seems like user is a reserved name) and to set impersonatingUser as nullable=true, if not this throw me an error.

from easyauditbundle.

kl3sk avatar kl3sk commented on June 2, 2024

Same issue for impersonatingUser, i had to make it nullable in order to work properly.

Can someone explain me what is the goal and how works this property ?

from easyauditbundle.

ronisaha avatar ronisaha commented on June 2, 2024

Of course you need to make nullable the impersonatingUser property as it is an optional property. impersonatingUser is used when you enable impersonatingUser feature. The field will hold the original user value.

from easyauditbundle.

kl3sk avatar kl3sk commented on June 2, 2024

Okay thank you, it sounds obvious

from easyauditbundle.

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.