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
  • 0 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

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer There's a book 'Programming Perl in the .NET Environment' that… May 11, 2026 at 10:11 am
  • added an answer In .NET when you are making calls across application domains… May 11, 2026 at 10:11 am
  • added an answer Is there a cross browser way(s) of detecting support for… May 11, 2026 at 10:11 am

Related Questions

I have the situation where i use GIS software which stores the information about
I have a situation where I want to copy the output assembly from one
I have a situation where I have to take input from the user using
I have a situation where I'm loading some content using a URLLoader but the
I've got a situation where I want to have a master list at the
The situation is, I have a website where the users get a sub domain.
The kind of simulation game that I have in mind is the kind where
I have the following situation: I built an Access form with a subform (which
I have the following situation: class A { public: A(int whichFoo); int foo1(); int
I have the following situation: A user will define a certain filter on a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.