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
|
Hello, I am not sure is there a way to turn this feature on (or is it even existing). In my database I have some unique keys defined. Most of them are checking uniqueness for one column only. I thought Lightspeed model would automatically set validate unique attribute for fields based on this kind of columns, but it doesn't. If this is not possible, it would be nice to have this kind of feature though, IMHO. It doesn't sound to me as difficult (time consuming) to implement judging from already present features, but you will know better. Marko |
|
|
You're right, this is probably something we could add reasonably easily for any given database -- the effort is more about figuring out how to query for unique keys in all 9 databases we support (there is also potentially a performance impact depending on whether we can collect the unique key info in an efficient way). Let me know which database you're using and I'll try to get that one done first. |
|
|
Hello Ivan We're using Oracle (10g). Thanks |
|
|
Hi! Is there any news on this? |
|
|
Unfortunately we're fairly heavily loaded at the moment so we've not made any progress on this. Sorry. Keep nagging us -- we will get round to it eventually! |
|
|
Hi Ivan, is it too early to start nagging again about this topic? :) |
|
|
It's always too early *grin*. We can investigate doing this as a one-way thing i.e. a unique key in the database will result in a unique validation in the model, but not vice versa (i.e. drag-and-drop and Update From Source will import unique keys from the database, but Update Database will not set up unique keys in the database). Two-way is likely be a bit more difficult and I'd be a bit reluctant to tackle that unless we find it falls out easily from the one-way solution. In either case we'll need to prioritise which databases we offer it on (most of the effort in a feature like this is figuring out how different databases surface the required key metadata). You guys are on Oracle, right? NOTE: None of the above constitutes a promise to implement this by any given date, or indeed at all -- just identifying requirements and priorities at this stage. |
|
|
Yes, we're on Oracle. Your "one-way thing" sounds perfect for us. Those UK constraints currently end-up as Oracle Exceptions, and not knowing easiliy about which property caused it, so having to manually check all properties with UK underneath.... Just to add some value to our case, judging by (as seen by me) increased topics on forum about LS comparing with other ORMs, and also increased inquiries about Oracle, this is for me confirming to be one of your best selling points (as there is no EF for Oracle). So any additional feature for Oracle is I think a good addition to that strong selling point. |
|