Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

RowVersion property is not supported #553

Open
TheRe4lOne opened this issue Apr 5, 2021 · 1 comment
Open

RowVersion property is not supported #553

TheRe4lOne opened this issue Apr 5, 2021 · 1 comment

Comments

@TheRe4lOne
Copy link

It seems like the RowVersion field is not used when an entity is being added during the Initialize method.
For example:
I have created an entity in my test with a RowVersion = "123" field.
Used the context Initialize method and passed as a parameter the entity I have just created.
In my plugin I have a code that retrieves this entity and doing something with the RowVersion field.
Apparently, when you retrieve this entity, the RowVersion is always null.

It seems like that the method Clone(this Entity e, Type t, XrmFakedContext context = null) in EntityExtensions.cs does not populate the RowVersion field but only the Id and Logical Name.

Just wanted to know if it is a bug or is there another way to get this field?

this is the part where I think the RowVersion is missing.
var cloned = Activator.CreateInstance(t) as Entity;
cloned.Id = e.Id;
cloned.LogicalName = e.LogicalName;

@jordimontana82
Copy link
Owner

Thanks for spotting this. There was no appetite in the community for a RowVersion property up until now apparently :D so yeah, the RowVersion cloning hasn't been there yet. I'll add it to the backlog.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants