On 25 Nov 2021, at 01:11, Jesse Tayler wrote:
> A collation would also work, I don’t think there’s a need to preserve case
> but I guess I have thus far and perhaps that’s an easier route than
> attempting to alter data in place, I could simply add the function in a way
> it can blend in perha
If I had the model and understood what you were looking for I might be able to
figure it out.
> On Nov 24, 2021, at 3:17 PM, Jesse Tayler via Webobjects-dev
> wrote:
>
> Thanks Ted, actually I was looking to see how to make a compound constraint -
> one static string type=“twitter” and I gu
Thanks Ted, actually I was looking to see how to make a compound constraint -
one static string type=“twitter” and I guess a lowercase version of a
user-entered display string keyStringToLowercase = username and the only way I
saw to add that into migrations was to write SQL and inject it?
But
An example of a migration:
Postgresql throws the exception then in ValidationException.strings I have:
{
"UniqueConstraintException.login_idx" = "Please choose a different login
(It must be unique).";
"Quote.quoteAmount"="You must enter a dollar amount in the format 123.00
(you ent
A collation would also work, I don’t think there’s a need to preserve case but
I guess I have thus far and perhaps that’s an easier route than attempting to
alter data in place, I could simply add the function in a way it can blend in
perhaps.
I tried to find a decent wiki page, but does anyone
Jesse,
If you specify a case insensitive collation for your column in the table, you
can preserve case and maintains case insensitive uniqueness. If you do not know
about collation, begin by reading on the subject, they basically define how to
compare and sort strings values.
Depending on the
Hi Jesse,
We often have a someValue_unique attribute that is set when the main editable
version of it is set. It isn’t editable by the user directly, but is adjusted
when the other value is update — and it is used for uniquing, i.e.:
public void setSomeValue(String value){ super.setSomeValue(va
so, basically, you are suggesting that I store them flat lowercase and put a
constraint on these two strings and just lose any case the user entered which
is fine I think.
With the lowercase assured the constraint will prevent duplicates and I’d catch
that exception during creation and handle i