Re: Unique attributes
Re: Unique attributes
- Subject: Re: Unique attributes
- From: Chuck Hill <email@hidden>
- Date: Tue, 14 Feb 2006 18:11:04 -0800
Hello Ian,
On Feb 14, 2006, at 5:44 PM, Ian Joyner wrote:
If I were to request a UNIQUE property in EOModeler, should this be
on a per-table basis (which would set UNIQUE against the column in
the underlying database), or on an EO entity (in the case of single
table inheritance, you would not want the column to be UNIQUE
because this may not be guaranteed between entities)?
Any thoughts?
Well, I think this may be why it was omitted from EOF. :-) It is
easy to do without inheritance. Single table inheritance is possible
provided that your database can support unique indexes across two or
more columns. I am not sure how you could implement it for vertical
inheritance at the database level unless you resorted to triggers /
stored procedures and queries. Horizontal inheritance should not
present a problem. And if you don't implement it at the pinch point
of the database level, how do you ensure uniqueness across instances.
Assuming that a technical solution can be found, the right place to
implement this is on a EO entity basis rather than a table basis.
And for good measure, sub classes can't make an inherited unique
attribute non-unique.
Chuck
On 15/02/2006, at 10:14 AM, Ian Joyner wrote:
Thanks for confirming my suspicions. I think I will submit a bug/
NFR about this. Has anyone else done so?
Ian
On 14/02/2006, at 5:25 PM, Robert Walker wrote:
but this is like a low-level non-functional performance tuning
solution, rather than being in the semantics of the model. Is
there a way to set unique on a column in EOModeler?
As far as I know there is not. You will still need to do some
database configuration/optimization in your database. At least
that's what I've always done.
--
Robert Walker
email@hidden
There are 10 types of people in the world, those who count in
binary, and those who don't.
On Feb 14, 2006, at 1:02 AM, Ian Joyner wrote:
Primary keys seem to be the only things that EOModeler counts as
unique. However, I want other columns in the DB to be unique,
particularly 'usercode'. I have modified this with SQL:
alter table USER column USERCODE set unique index;
but this is like a low-level non-functional performance tuning
solution, rather than being in the semantics of the model. Is
there a way to set unique on a column in EOModeler?
Ian Joyner
Sportstec
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40sportstec.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40sportstec.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden