Forums / Developer / Is there a datatype for "Link to Other Object"?

Is there a datatype for "Link to Other Object"?

Author Message

Sophi Italy

Monday 12 May 2003 12:25:22 pm

As I understand it, each attribute on a content class is typed with a datatype e.g. String, xmlText, etc.

Is there a datatype for "Link to another content object"?
Is there a data type for "Set of links to other content objects"?

Is is possible for me to figure out the answers to these myself without looking at the source code?

I would like to have something like
class B
some attributes of B
end

class A
name: String
good_bs: Set of Bs
bad_bs: Set of Bs
end

I believe "Related Objects" will allow me to group some related Bs into each A_object. However, I do not believe it will allow me to distinguish the good_bs from the bad_bs for a given A_object.

Thanks.

Paul Borgermans

Tuesday 13 May 2003 2:13:11 am

There is a object relation, but this works for one relation at a time.

For this and other attribute types (like URL) it would be logical to have the option to specify multiple items (like the general related objects do).

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Sophi Italy

Tuesday 13 May 2003 8:28:40 am

Thanks Paul.

Where can I learn more about "object relation"? I tried to google-search the site ez.no and did not have much luck.

Do I understand you correctly that (a) I can currently do:
class A
the_best_B: B
end

but cannot do:
class A
all_good_bs: Set of Bs
end

krish harry

Saturday 24 May 2003 12:34:51 am

class A
name: String
good_bs: Set of Bs
bad_bs: Set of Bs
end

To achive the above couldn't you make another attribute in Class B named "rating" and give enumerated values like "Good", "Bad" and "Best".

Now you are anyways getting list of B's . But with this attribute you can also distiguish between those B's i.e. they are good or bad or best.

I dont know why this idea didn't struct you all ? Or am i completly wrong?