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
|
I am using LightSpeed version 4.0.646.18138. I want to create my own generic abstract base class from which a number of other classes will inherit from. I am able to do this by coding my own abstract class and creating an External Class Reference in the Model. However, using this approach results in no properties from my abstract class being generated in the database. This is a problem. So, my question is whether there is a way for me to create this generic abstract base class using the designer so that the properties can be generated in the database as they should be? |
|
|
No, we dont try and synchronize any external base classes for entities in the designer - there is a warning dialog that pop's up when you do this to warn about this situation. You will also notice that if you manually add in the base class fields they will erroneously be picked up for inclusion in the entity on a sync from the database. So you do have to be quite manually using the database synchronization in this situation. Did you think about setting up the base class through the designer instead? If so what was not working for you with that approach?
|
|
|
Hi Jeremy. Thank you for your reply, however you failed to answer actual question which appears at the end of my post. I have tried many ways to try and do this the designer and have not been able to do so. So, my main issue and question is: Is a way for me to create a generic abstract base class using the designer? As I say, I have tried various ways of doing this and none have succeeded. The main problem is that when I create the entity in the designer and go to the properties, I can only choose Int32, Int64, Guid and String as Identity Type and not Generic. If this list had Generic as an option, then I think I would be able to get this right in the designer. I need to know whether I can achieve the equivalent of the following declaration in the designer:
I hope this makes my question clear. |
|
|
Sorry I was assuming "generic" was meaning applied globally rather than "has generic arguments". To answer your question: no, you wont be able to specify that since we dont support generic arguments in the designer. You will need to stick with hand crafting for that type of base class unfortunately.
|
|
|
Is there a place where I can propose this as a feature to be added? |
|
|
Yep, just here in the forums is the best place - we are looking at adding in a feature voting facility into the forum soon but for now if you have a suggestion just add a post about it. Ill add this to the backlog for future enhancement. If anyone else is keen on this please let us know :)
|
|
|
This would be a nifty addition to Lightspeed. |
|