thanks.

so presumably if you have constraints that are a bit more complex than
unique/PK, you code these somehow into your model classes, and never
really touch the sql itself?

(we currently have stuff like :

CREATE TABLE languages(
  id SERIAL PRIMARY KEY,
  language_code TEXT UNIQUE,
  is_original BOOLEAN NOT NULL DEFAULT FALSE
);

-- there can only be ONE base language
CREATE UNIQUE index languages_only_one_true_base_idx
ON languages (is_original)
WHERE is_original;

in db.sql - I guess I'd have to overload the accessor or something with DBIx?
)




-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to