multiple primary keys

28 views
Skip to first unread message

João Ribeiro

unread,
May 22, 2013, 8:44:32 AM5/22/13
to intersys...@googlegroups.com
how can i put multiple primary keys on a class
I have this propertys as primary keys..

Property Edificio As %Integer;

Index EdificioIndex On Edificio [ PrimaryKey, Unique ];

Property Planta As %Integer;

Index PlantaIndex On Planta [ PrimaryKey, Unique ];

Property Sala As %Integer;

Index SalaIndex On Sala [ PrimaryKey, Unique ];


but this make an error...(multiple primary keys).


Thanks,
João Ribeiro

Tom Fitzgibbon

unread,
May 22, 2013, 9:09:02 AM5/22/13
to intersys...@googlegroups.com
Why do you need multiple primary keys?



--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
---
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-z...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

peter cooper

unread,
May 22, 2013, 9:56:49 AM5/22/13
to intersys...@googlegroups.com

Hi João

 

Just have one primay key and make the other one just

Index SalaIndex On Sala [Unique ];

 

Peter

--

Ayumu Tanaka

unread,
May 22, 2013, 10:07:02 PM5/22/13
to intersys...@googlegroups.com
You can define one primary key index on 3 properties.

Index MultipleIndex On (Edificio, Planta, Sala) [ PrimaryKey, Unique ];

http://docs.intersystems.com/cache20131/csp/docbook/DocBook.UI.Page.cls?KEY=GSQL_indices#GSQL_indices_std_multprop

Ayumu
> Joao Ribeiro

João Ribeiro

unread,
May 24, 2013, 4:38:58 AM5/24/13
to intersys...@googlegroups.com
thank you it worked


2013/5/23 Ayumu Tanaka <ayumu....@intersystems.com>
Reply all
Reply to author
Forward
0 new messages