Rob wrote:
I do seem to have a bunch of problems using Entity as well actually. But the problem could perhaps be originate in Transaction in some earlier instance?
If I was to change the word Transaction to MoneyTransaction, would that solve my problem?
The problem is this: an entity has fields mapped onto relations with other entities. These fields will become properties in the entity class. So if an entity Foo has a field 'Transaction' mapped on its relation with the Transaction entity, the FooEntity class will get a property called 'Transaction'.
The base class of the entity already has a property called 'Transaction'. This means that the new property hides the property of the base class.
To find out which properties are not allowed (or are defined in the base class), please consult the reference manual: open the ORMSupportClasses book and if you use adapter, check EntityBase2, otherwise check EntityBase.
To avoid name clashes, all classes are suffixed with 'Entity' or other suffix, so most of the time there are no problems.
There reason I ask, instead of trying myself, is that I have 130 tables in the solution and very many relations to the Transaction and Entity tables, which means I have to manually try to find all of these in the GUI. And since it finds hundreds of "false" many to many relations it is not funny to go in and disable and rename them all just in order to find out the answer to my above question.
Delete the entity from the project, for example the Transaction entity. Then re-add it and in the add screen, give it another name, then click OK. The names of the fields mapped on the relations with this entity in other entities are now based on the new name of the entity, so you don't have to rename all these entities.
You can 'hide' the m:n relations you don't want (hide both sides) in the editor of an entity.
(edit) I've added to the todo a better name checking routine, which consults the latest runtime lib base classes for name clashes and it should then adjust the name accordingly.