Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 49559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:27:21+00:00 2026-05-10T16:27:21+00:00

I have the situation where i use GIS software which stores the information about

  • 0

I have the situation where i use GIS software which stores the information about GIS objects into separate database table for each type/class of GIS object (road, river, building, sea, …) and keeps the metadata table in which it stores info about the class name and its DB table.

Those GIS objects of different classes share some parameters, i.e. Description and ID. I’d like to represent all of these different GIS classes with one common C# class (let’s call it GisObject), which is enough for what i need to do from the non-GIS part of the application which lists GIS objects of the given GIS class.

The problem for me is how to map those objects using NHibernate to explain to the NHibernate when creating a C# GisObject to receive and use the table name as a parameter which will be read from the meta table (it can be in two steps, i can manually fetch the table name in first step and then pass it down to the NHibernate when pulling GisObject data).

Has anybody dealt with this kind of situation, and can it be done at all?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:27:21+00:00Added an answer on May 10, 2026 at 4:27 pm

    @Brian Chiasson

    Unfortunately, it’s not an option to create all classes of GIS data because classes are created dynamically in the application. Every GIS data of the same type should be a class, but my user has the possibility to get new set of data and put it in the database. I can’t know in front which classes my user will have in the application. Therefore, the in-front per-class mapping model doesn’t work because tomorrow there will be another new database table, and a need to create new class with new mapping.

    @all There might be a possibility to write my own custom query in the XML config file of my GisObject class, then in the data access class fetching that query using the

    string qs = getSession().getNamedQuery(queryName); 

    and use the string replace to inject database name (by replacing some placeholder string) which i will pass as a parameter.

    qs = qs.replace(':tablename:', tableName); 

    How do you feel about that solution? I know it might be a security risk in an uncontrolled environment where the table name would be fetched as the user input, but in this case, i have a meta table containing right and valid table names for the GIS data classes which i will read before calling the query for fetching data for the specific class of GIS objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation where I want to use permissions on database objects, but
I have situation in which I read a record from a database. And if
I have a situation on a single page web application. I use address information
I have situation where I generate stylesheets based on information in the database. This
I have a situation where I want to use several server side controls, which
I have a situation in which I have to use eval in Javascript. Yes,
I have a situation where i have to use two execute sql tasks which
I have a situation where which git strategy is suitable to use? Situation :
We have a situation where we want to use filter for URL's containing some
i have a situation where i need to use GPS technique. i need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.