[cl-dwim-devel] Reference without _oid

Kambiz Darabi darabi at m-creations.com
Fri Oct 26 15:49:28 UTC 2012


Hi,

I have some new questions regarding perec:

1) is it possible to create a unique constraint on a group of slots?

As an example, give this entity:

(def entity text-content (audited-entity)
  ((key :type standard-text)
   (category :type standard-text)
   (mime-type :type standard-text)
   (locale :type standard-text)
   (description :type long-text)
   (value :type (text 20000)))
  (:documentation "Internationalisation table for the text content
  where plain and html text should go. There is a unique index
  on (key,category,locale)"))

I currently create the index with an sql script 

CREATE UNIQUE INDEX category_locale_key_on_text_content_idx ON
text_content USING btree (category, locale, key);

which is run after exporting the model to the DB.

2) what is your strategy for dealing with changes of the class_id if you
rename a class during the early stages of a project?

If I understand the code correctly, the class_id is calculated by
hashing the class name with crc32. So the class_id changes when I rename
an entity, which might happen during the first phase of the project.

What issues arise from such a change and how does one deal with them?


3) why did you select crc32 as hashing algorithm?



Thank you



Kami

PS: sorry for BCCing to your private mail, if you receive the message
multiple times




More information about the cl-dwim-devel mailing list