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
|
(working with eval version I just downloaded) Database is ORACLE 11g - where is the up-to-date provider for that by the way? How do I add it? I am working with a legacy database (that is originally my fault) and the primary key of the main table suffers from intelligence, in that it can be up to 15 characters (no oddballs) with possible leading values, and so on. Like it or not this is the primary key. It is used to generate an alternate key that is also editable (they may be identical, but are not required to be). I need to take the user's value for this primary key (pretend it is a custom order number, for example) and give it to Lightspeed to use. What I need to do is: var key = "SOMETHING"; // from a form entity.KEYCOLUMN = key; However the model from LS does not expose the primary key as a property so I cannot just set it AFAICT. Is there a procedure for handling this that is documented? Also, what do I do about handling primary keys? I cannot see those correctly in the designer either. A subordinate table to the one I described above has a composite key of parentkey,subtablekey where parentkey is in the parent table and supplied by the user on initial parent record creation, and subtablekey is in the subtable and generated with business logic ( it is supposed to be 4 upper case letters, by a rule that precludes nasties). In the designer, the subtablekey is correctly defined and set to the right length, but it is only part of the key. Does the parentkey flow down automatically or do I have to supply it? Again, I need to set the subtablekey from business logic... I need some help urgently to decide if LS can do the job for me with my creaky old legacy database. I cannot add ID willy-nilly and so on. Thank you. Allen |
|
|
OK, well further delving into the documentation has revealed the use of the [Transient] attribute descriptor to deal with this. I have done: public partial class Bridge : Entity
which lets me do this when I new-up a Bridge entity newbr: newbr.TargetBrkey = theNewBrkey; LS then takes care of generating the Id... |
|