cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Mapping fake FKs as relationships?
Date Sun, 10 Jan 2010 14:35:02 GMT
Not directly, but you can emulate that with entity qualifiers by  
filtering the generic entity on the value of the column that is not  
participating in a join. You can even map that as an inheritance  


On Jan 10, 2010, at 4:05 PM, George Stan wrote:
> Hi,
> Is it possible to map fake foreign keys with CM?
> In many DBs for webapps there seem to be quite a few tables (for  
> entities like Tags, Comments, Attachments, Events) to have  
> relationships to many other tables, and instead of a FK, a  
> combination of two fields is used (target_table_name and  
> target_row_id).
> I know that other ORMs (like ActiveRecord from RoR) have this  
> feature, but I'm not sure about Cayenne.
> Thanks in advance,
> George.

View raw message