On 4/3/07, Ovid <[EMAIL PROTECTED]> wrote: > 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.
Keep in mind that you can still make Perl aliases: package MyThing; ... __PACKAGE__->meta->setup ( columns => [ my_pk => { ... }, # can't alias here ... ], ... ); *id = \&my_pk; # can alias here I'm not sure if that helps. If not, the other option is to use RDBO to do the actual database manipulation, but build another layer on top of that to present the public API. MyWrappedThing "has a" MyThing, and so on. -John ------------------------------------------------------------------------- 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