Chris187 wrote:
Hi,
I read on the forum that I cannot change the name of the entities and that I should use subclasses instead.
if you want to get rid of the 'entity' suffix. But it's not without problems however. The main thing is that you also need extra factory classes, and you're effectively creating a parallel hierarchy, which isn't recommended.
So I created a subclass for each entity:
public class First : FirstEntity { }
public class Second: SecondEntity { }
public class Third : ThirdEntity { }
Now I want to use First, Second and Third in my code instead of FirstEntity, SecondEntity and ThirdEntity.
If I use my subclasses for a "FetchEntityCollection" it always throws an error.
"item can't be null"
What am I doing wrong?
It's unfortunately not that simple. You also need to create additional factories, and e.g. Customer.Orders has to return a collection of Order instances, not OrderEntity instances.
Is having the 'Entity' suffix a problematic situation for you? Because it's more trouble than it's worth to get rid of it.