Comments (8)
@braianj Yup, user
is a reserved keyword in Postgresql: https://www.postgresql.org/docs/9.6/static/sql-keywords-appendix.html
from easyauditbundle.
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.
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.
Could you also share the entity class. Another question, are you using fos user bundle? If yes which version?
from easyauditbundle.
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.
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.
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.
Okay thank you, it sounds obvious
from easyauditbundle.
Related Issues (20)
- How to log the many to many changes HOT 2
- Problem with DoctrineSubscriber delete event when using proxy classes HOT 2
- Saving collection of entity form types problem: PreUpdateEventArgs::__construct() must be of the type array, null given HOT 10
- Block Chain Audit Trail Logger
- How to save the circular reference HOT 1
- The service "xiidea.easy_audit.entity_delete_event.subscriber" must be public as event subscribers are lazy-loaded. HOT 3
- undefined index throwing notice
- Attempted to call an undefined method named getBestCandidatePropertyForIdentify of class Resolver\EntityEventResolver HOT 4
- Support ODM HOT 7
- Incompatibility for 1.4.6 ->1.4.9 HOT 2
- flush($entity) is deprecated, and duplicates updates and logs HOT 2
- Possible incompatibility with symfony/contracts
- Doctrine ODM namespace error HOT 5
- Add support for multiple entity managers HOT 1
- Symfony 5 Support
- Support for Symfony 4.4.* LTS? HOT 2
- Allow PHP 8 in composer.json version constraints. HOT 1
- Upgraded to Symfony 5 HOT 2
- Get previous value and changed value. HOT 1
- Symfony 6 support? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyauditbundle.