I have a problem using NHibernate in a way that maybe is a bit
unorthodox.
What I'm trying to do is to query a star schema in a datawarehouse
using Hql.

Now you may say: "What you're trying to do is wrong. If it doesn't
work it's your fault. Don't bother me!", and you wouldn't be too far
from being right. Anyway, I know I'm trying to do something completely
out of any best practice, so please don't try to explain me that I
shouldn't.

Basically I'm mapping dimension tables as entities, and that's cool
because dimension tables have primary keys, otherwise how could they
be referenced by fact tables? So I use primary keys of dimension
tables as identifiers.

Fact tables, instead, only have foreign keys towards dimension tables
plus some numeric measures: no primary key is present, if you do not
consider the unique index on the set of all foreign keys. So I cannot
define an identifier and my mappings are rejected.

Both dimension tables and fact tables are populated by Etl procedures,
so as far as NHibernate is concerned they are read-only objects. I
don't use NHibernate for inserts or updates, only to perform Hql
queries. So Identifiers are really used only for reference: since fact
tables are never referenced it would be ok for them not to have ids,
still NHibernate seems to require identifiers anyway, even if thay are
never going to be used.

Why bother using NHibernate? If I'd do it, I could benefit from a lot
of other stuff I've developed.

Do you have ideas? Do you think this is possible somehow?

Thanks everybody!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to