This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi guys, got a nasty one this time actually two .. let me start with the one easier to describe: It is regarding the names for the foreign keys generated in the designer Class A and Class B is linked via FkA (1:N from B to A) so we have FkA from A and FkAs from B right ? thats the initial status. now when you add Class C with another 1:N FkA to A the generated name for FkA from B to A changes to FkAsByC this is not only happening when you add Class C to the model it sometimes happens when you remove Class B and drag it in again. There is no need to change the local names for foreign key fields ? I do not need the names to be unique on the contrary .. changing names as the model grows is a NONO .. this creates additional effort ... Now the second problem which is harder to describe and I do not yet have a clear way to reproduce it When I add a class with FK to an existing one in the model sometimes the foreign key field implementing the fk is not found when creating queries in LS. deleting the previously existing class and redragging it solves the problem for this field but other depending classes show that problem after the previous class has bee redragged onto the model. then I have to delete all classes in the "chain" until eventually LS is happy again and finds all fields. Recently this becomes time consuming when you have to re add 20-30 classes I am not sure if I have described it right .. but this has to be fixed otherwise I go mad .. my final model has well over 200 classes and I wait for the day when I have to redrag 100+ regards gmd |
|
|
The "ByX" suffix gets added when an entity has more than one association back to another entity, or you have two associations with the same name so we suffix the association so you dont end up with two properties with the same name (leading to a compilation error). If I am understanding correctly it sounds like you have two associations with the same name? (FkA) which will be why this is getting updated. Let us know if you can reproduce the second issue and if you can send that through we can have a look into what the issue is.
|
|
|
Let us concentrate on one thing at a time: Naming of relationship. The naming must not change depending on the number of relationships or possible conflicts or not. If you have a project with evolutionary life cycle it is not predictable if situations may arise when relationship names change. This can happen after 4 weeks or 8 months. If you have a released version and require db extensions which in turn may result in changing relationship names of previous components you create unacceptable additional effort. What I am saying is you should use the ByX notation all the time and not only under certain conditions .. or at least give me the opportunity via property (parameter) to force this .. I would opt for it any time because creating changes (under the cover) of old code is unacceptable to me .. ok let us clarify this first and then I will try and address the other ones one by one regards gmd |
|
|
We update this where there is a naming conflict to avoid compiler errors, so this does depend on the nature of the model - adding or removing entities does affect this and each time this changes we treat it as an independent generation so it does depend entirely on the number of relationships and any conflicts that we find :) I suspect your point is more that once you have generated the model the first time you would not expect that existing relationship names would be affected by changes to the model (e.g by dragging on a new entity where there might be a conflict) which is certainly a fair point however we dont have a way of expressing that you would like to fix a name in place, e.g. we cant tell the difference between you dragging on the entities one by one in quick succession and subsequently dragging on the subsequent entity which would lead to a conflict 3 months later.
|
|
|
When you use ByX generally we do not have changing names .. I DO NOT WANT NAMES TO CHANGE AT ANY POINT .. when I drag an entity to the model it should create unique relationship names.. period .. no matter what .. If you don't do it I will .. this is unacceptable to me .. because I might not be the person making the change in three months and the person who does it will fall in that trap .. not a good idea .. regards gmd |
|
|
ok .. next step: attached is a case where you use ByX without double key names the marked relationship changes names everytime you drag it again I have the same model in SQLServer and it is not showing ByX so what I am suggesting would even solve some bugs .. there will be more coming .. because it is all kind of related regards gmd |
|
|
Yes that does sound like a bug. Are you able to send through a copy of your model please as this will allow us to reproduce what you are seeing and try and track this down. If needed you can email this through to us at support at mindscape.co.nz rather than attaching it to the forum post.
|
|