Discussion:
[nhusers] Difficult Problem - I need to allow end users to create custom entities
Matt Mangold
2017-11-08 16:02:40 UTC
Permalink
I need to create a way for end users to create custom entities and create
custom relationships between entities. Has anyone done this before in
NHibernate?

I was thinking about using Codedom to create entities and mapping files
then generating the schema on the fly. I was wondering if there are any
patterns around that solve this problem.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Gunnar Liljas
2017-11-09 19:13:46 UTC
Permalink
While that would certainly be possible, how would it be used? What should
be queryable? Quantities?

/G
Post by Matt Mangold
I need to create a way for end users to create custom entities and create
custom relationships between entities. Has anyone done this before in
NHibernate?
I was thinking about using Codedom to create entities and mapping files
then generating the schema on the fly. I was wondering if there are any
patterns around that solve this problem.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Matt Mangold
2017-11-09 20:44:09 UTC
Permalink
The reason for this is so that power users can extend the schema of the
application to suit their business needs. This is common in CMS systems
where end users need to create new screens and or entities. We have a
standard application that is used by many tenants. Each tenant has
different needs and some need additional tables to track their data. This
application already has a screen builder and report builder that can
interact with existing entities in the system, and it is all dynamic super
flexible.

I actually got a prototype working yesterday that uses Roslyn to generate
C# POCO entities and Fluent Nhibernate mapping files. Roslyn is nice,
because you can compile code in real time.
Post by Gunnar Liljas
While that would certainly be possible, how would it be used? What should
be queryable? Quantities?
/G
Post by Matt Mangold
I need to create a way for end users to create custom entities and create
custom relationships between entities. Has anyone done this before in
NHibernate?
I was thinking about using Codedom to create entities and mapping files
then generating the schema on the fly. I was wondering if there are any
patterns around that solve this problem.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Ricardo Peres
2017-11-10 10:53:24 UTC
Permalink
You can create entities dynamically by feeding them to the Configuration
(or some inner object, don't have that on top of my head) and you can query
them using HQL or Entity Mode Map.

RP
Post by Matt Mangold
The reason for this is so that power users can extend the schema of the
application to suit their business needs. This is common in CMS systems
where end users need to create new screens and or entities. We have a
standard application that is used by many tenants. Each tenant has
different needs and some need additional tables to track their data. This
application already has a screen builder and report builder that can
interact with existing entities in the system, and it is all dynamic super
flexible.
I actually got a prototype working yesterday that uses Roslyn to generate
C# POCO entities and Fluent Nhibernate mapping files. Roslyn is nice,
because you can compile code in real time.
Post by Gunnar Liljas
While that would certainly be possible, how would it be used? What should
be queryable? Quantities?
/G
Post by Matt Mangold
I need to create a way for end users to create custom entities and
create custom relationships between entities. Has anyone done this before
in NHibernate?
I was thinking about using Codedom to create entities and mapping files
then generating the schema on the fly. I was wondering if there are any
patterns around that solve this problem.
--
You received this message because you are subscribed to the Google
Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Loading...