Hide a field or Unique ID?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Hide a field or Unique ID?

DeHaynes
I am working on a Contacts application that will allow people to keep contact information on

* Companies
* Departments
* People

These can contain multiple:
* Addresses
* E-mail Addresses
* Phone Numbers.

First question:  Is there already a ID field on each instance of an object?  If not, I will want to generate one.  If I do that, can I hide this ID field from the search engine?

Second question:  If I do a traditional many-to-many relationship where you would have a middle document that connects the many on both sides, (see document below)  Is it possible to query this type of relationship?
Reply | Threaded
Open this post in threaded view
|

Re: Hide a field or Unique ID?

Guillaume "Louis-Marie" Delhumeau
2014-03-12 16:18 GMT+01:00 DeHaynes <[hidden email]>:

> I am working on a Contacts application that will allow people to keep
> contact
> information on
>
> * Companies
> * Departments
> * People
>
> These can contain multiple:
> * Addresses
> * E-mail Addresses
> * Phone Numbers.
>
> First question:  Is there already a ID field on each instance of an object?
> If not, I will want to generate one.  If I do that, can I hide this ID
> field
> from the search engine?
>

As far as I remember, there is one, but it depends on the document fullname.
Usually, we reference such an object with {page fullname, object classname,
object number}.


>
> Second question:  If I do a traditional many-to-many relationship where you
> would have a middle document that connects the many on both sides, (see
> document below)
> <http://xwiki.475771.n2.nabble.com/file/n7589555/many-to-many.png>  Is it
> possible to query this type of relationship?
>
>
I don't see any reason why it would not work.

I hope it helps,
Louis-Marie


>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Hide-a-field-or-Unique-ID-tp7589555.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Hide a field or Unique ID?

DeHaynes
Please forgive my ignorance but I just want to make sure I understand you.

To uniquely identify an instance of an Template (not sure about the terminology), you use three fields.  They are
* page fullname
* object classname
* object number

??
Reply | Threaded
Open this post in threaded view
|

Re: Hide a field or Unique ID?

jerem
Hello,

Yes, the wiki model is that each page (identified by its fullname) can
contain one to many objects (or XObjects), instances of a given class (or
XClass). An XClass being stored in another page, "object classname" is the
fullname of the page that hosts the class. So to uniquely identify an
object instance, you need to know in which page it is (page fullname), of
which class it's an instance (object classname), and it's number (if there
are several objects of same class in the page).
You can play with object editor when editing a page, it's easier to get ;)

Note that if your purpose is to materialize a one-to-many relation-ship
between two objects, another approach is to use property type "DBList" or
"DBTreeList".

BR,
Jeremie


2014-03-12 19:08 GMT+01:00 DeHaynes <[hidden email]>:

> Please forgive my ignorance but I just want to make sure I understand you.
>
> To uniquely identify an instance of an Template (not sure about the
> terminology), you use three fields.  They are
> * page fullname
> * object classname
> * object number
>
> ??
>
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Hide-a-field-or-Unique-ID-tp7589555p7589559.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs