Symfony 2.8 - Datadog audit bundle retrieve entity - symfony

I used the DataDog Audit bundle in order to log every action that happens in my MySQL database. However when I check the diff column in the audit_log table I can't find the ID of the respective entity that have been updated/inserted/deleted etc. I also can't find which user is responsible for a certain action. Does anyone know if the DataDog audit bundle saves the ID of the entity to which action are performed and if this is the case where I can retrieve this data?

Yes it does have this functionality in the Audit Association entity. The entity stored with the blame_id in the Audit Log entity contains information regarding the user. The one with source_id contains information regarding the entity itself and thus the ID of the entity in the fk field.

Related

In Corda, how can nodes be assigned public roles?

I have written a CorDapp where I want to treat counterparty nodes differently based on their "role".
For example, I may want to check that a counterparty node has the "cash issuer" role before requesting cash issuance from them.
What's the best way to define public node roles in this way?
As of Corda 3, there isn't built-in support for this feature. Support is expected to be added in a future release.
In the meantime, there are several workarounds:
Using an oracle, as Kid101 mentions above. The oracle would store role information that could be queried by nodes
The roles could be retrieved via a HTTP call within the flow - see the Flow HTTP sample
The roles could be stored in the node's database and retrieved within the flow - see the Flow DB sample
Each node could have a flow pair that returns the node's role
The roles could be hardcoded in a configuration file installed on each node - see How to provide a CorDapp with custom config in Corda?
The roles could be hardcoded in the CorDapp's flows

Unable to revoke inherited access of a related entity in Dynamics 365

I have an account with related contacts. When I share/unshare an account all related contact records are also shared/unshared. If I unshare a contact record and login to the user with revoked access to this record, this user still has access to it.
This is probably due to a cascading Entity relationship behavior.
When a one-to-many entity relationship exists there are cascading
behaviors that can be configured to preserve data integrity and
automate business processes.
These configuration options are called cascading behaviors because
they cascade down the hierarchy of related entities. For example, if
deleting an account causes related opportunities to be deleted, what
about the activities associated with the opportunities? In Microsoft
Dynamics 365 the behavior defined in each of the entity relationships
for activity type entities is that they are deleted as well.
Check what settings you have for Share on the relationships between account and contact. It's probably set to Cascade.
Action - Share
Description - When the referenced entity record is shared with another user.
Valid Options (Values) - Active, Cascade, NoCascade, UserOwned.
Value | Description
Active | Perform the action on all active referencing entity records
associated with the referenced entity record.
Cascade | Perform the action on all referencing entity records
associated with the referenced entity record.
NoCascade | Do nothing.
UserOwned | Perform the action on all referencing entity records owned
by the same user as the referenced entity record.

Two databases and various entities

How can I associate two entities, each in a different database.
I have created two entity manager one for each database, default and customer_1.
You cannot associate entities in different databases, at least not in the latest Doctrine version.
Moreover this is not advisable as the underlying database server (ie. MySQL) will not be able to guarantee data integrity across independent databases. Foreign keys for example do not allow you to reference keys outside the parent database.
The multiple entity managers as envisioned by Symfony here http://symfony.com/doc/current/cookbook/doctrine/multiple_entity_managers.html are meant only for accessing different bundle sets in the same app. If you want to associate your entities you'll have to use one database.

Sync Database with XML

I am thinking about a system which includes XML or XML-like tech. My scenario, i have products in my database tables and i want to export these products, so any user can get my product list with an XML or another way and import their system. It is common usage, i know but i wonder, how can i sync the product quantities. What will be happen, if any user sell my product. How can i edit the quantity field in my DB ? Which technologies can i use ? I think API will be best but how can i use XML ?
You need to create a public api.
users should create an account and you give them an api-key in order to access the api.
you give them a GET method with they use to recieve the product list and a POST method to report the purchases. Once the purchase comes in from the user, you update the records accordingly in your database.
MVC 4 has some good capabilities to create api.
See below:
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
How to return Xml Data from a Web API Method?
Creating REST API for existing MVC based website

Search engine bundle with dynamic DBAL connection

I have a SF2 application using multiple database connections. There is a database for each user account, so their number isn't static.
I use a DBAL connection factory to access a database depending on which user is logged in.
I need to integrate a search engine bundle that can work well with this type on configuration.
It should be able to :
generate search indexes per database
manage indexes for databases that have identical structures (same table and column names)
do search requests only in the database related to the logged user.
I know it's a custom configuration and not very popular but I hope somebody can help me find maybe the start of a solution, here. Thanks.
I have already checked Elastica and Solr bundles, but I don't know how to configure them without modifying the code.

Resources