--- John Siracusa <[EMAIL PROTECTED]> wrote:

> Keep in mind that you cannot alias columns that are part of the
> primary key.
> The SVN version should throw an exception if you try, but the CPAN
> version
> will not, so be careful.

Oh, I didn't know that.  So here's a bit of a problem then.

Where I work has some of the worst database "design" I've ever
encountered.  Very few people here know how to use a database.  So an
ID field might be named 'id'.  It might be named 'server'.  Hell, it
might even be an SQL reserved word.

What we're trying to do is use an ORM to make it easy to pull all
database knowledge into a given layer and actually expose *very* little
of structure, just the functionality.  However, because surrogate
(non-identifying) keys are rarely used, I have to expose the ID fields
:(  I would very much like to be in a position where if someone sees a
property named "username", they don't know or care whether or not
that's an ID and eventually, I can throw surrogate keys on the
"accounts" table and no longer worry about whether or not a "username"
needs to be changed.

Thus, being able to alias primary key columns would be very useful.

Cheers,
Ovid

--

Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to