mapping

NHibernate Bag Mapping

Hi I need a hand mapping a collection. I am using a join table to hold references to rooms ids and calEvent Ids. However, the look ups will mainly be based on the room's buildingID - so I'd like to add buildingID to the following mapping. Does anyone know how to do so. I've looked through the NHibernate docs but can't find anything. <b...

Mapping CSV to a Model

I am writing a simple CSV to XML processor in Java. I am using JAXB to generate a model in java from a DTD. I need to process the CSV format into this model, and then marshall it into the XML that complies to the DTD. I am using JAXB to marhall the data from the Java model to the XML. I have to write the CSV-Model mapping myself. At th...

Hibernate One-To-Many Unidirectional on an existing DB

Hello Stack Overflow Experts, i have need of your expertice: I am trying to use Hibernate on an Existing DB. Currently im trying to load a User object and a list of UserData objects that go along. in the DB the (simplified) layout is | User | | UserData | ---------------- ----------------------...

NHibernate programmatic mapping file loading with embedded resources

My application supports both Oracle and MS SQL databases, with slightly different schemas having been implemented for each. One issue I've run into is a class that has an auto-increment primary key under MS SQL, but a manually-inserted primary key under Oracle. Right now, the two different mappings for the class look like this: Oracle:...

Easiest way to create a dynamic heatmap of the United States

Hello All, thanks for all the help the last few days. I'm hoping someone knows this one. I'm looking to dynamically create a heatmap of data based on user input, then color certain states based on the response. Like a poll for voting, for example. I'd like to do something like this... http://www.trulia.com/home_prices/ What is going to...

NHibernate - join without mapping

Hi, Is it possible to join two classes without specified mapping between them (using Criteria API)? I must join two classes and retrieve data from both but I can't mapping them. I know only foreign key SomeID in the first class and primary key ID in second. How to create Criteria to join them? Is it possible without mapping? Please, ...

Domain Driven Design, SOC, and entity identification

I've been trying to wrap my mind around DDD and how it can relate to MVC, but I'm having trouble with regards to entity identification. In particular, I'm trying to maintain strict separation between my presentation, domain, and data models. My hangup here is in how I preserve entity identification across these boundaries. To clarify, I...

ArcGIS MapControl and Ms Access delay map re-draw?

Hello, This pertains to embedding ESRI MapControls into Access Database Forms. I have two access files, split into a frontend and backend. My backend is also a PersonalGeoDatabase that ArcGIS uses to store a feature class for display on a From embedded ESRI map control. The feature class stores polylines, points, and polygons which a...

Hibernate - New colums from a joined table

I have a class User object. I am trying to load this object from the Database using Hibernate. My SQL statement is: SELECT users.uid AS uid, users.deleted AS deleted, users.username AS username, users.passwd AS passwd, users.disabled AS disabled, users.lockout AS lockout, users.expires AS expires, data_first...

Visual Xml to .net object mapper

Hi guys: I have to export my data, practically the entire domain model structure into a formal xml file. Does anyone know a visual tool that I can use to map an xml schema to my .NET object model? ...

"Distinct" results from SQL query using a mappings table

Hi, I have two tables tbl1 and tbl2, both with two columns, one for id and one for product. I want to extract the rows that are in both, i.e. rows where tbl1.id = tbl2.id and tbl1.product = tbl2.product and join the row from tbl1 and tbl2 into one row. I imagine this goes something like this: SELECT tbl1.\*, tbl2.\* FROM tbl1, tbl2 WH...

Need Better Algorithm for Finding Mapping Between 2 Sets of Points with Minimum Distance

Problem: I have two overlapping 2D shapes, A and B, each shape having the same number of pixels, but differing in shape. Some portion of the shapes are overlapping, and there are some pieces of each that are not overlapping. My goal is to move all the non-overlapping pixels in shape A to the non-overlapping pixels in shape B. Since the n...

How to map Items which its SubItems are in the same Table with Nhibernate?

Hi, I am trying to build a messaging system and for this i have the table definition below Message Id From To Body ParentId // Subcollection, i want to get Asnwers (Message.ParentId== Message.Id) IsRead and i have this in the Message.cs IList<Message> Answers; I have tried this but it gives me all the messages and all the answers...

URL Rewriting

i am using URL rewriting in my asp.net application using regx virtual URL is /ProductDatabaseCMS/(?<category>\w*)/Product/(?<product>\w*)\.aspx original URL is /ProductDatabaseCMS/Product.aspx?PROD_ID=${product} application path is ~/ProductDatabaseCMS my application has master page that uses style sheet and the path is ~/App_Th...

How to display data using openlayers with OpenStreetMap in geodjango?

I've got geodjango running using openlayers and OpenStreetMaps with the admin app. Now I want to write some views to display the data. Basically, I just want to add a list of points (seen in the admin) to the map. Geodjango appears to use a special openlayers.js file to do it's magic in the admin. Is there a good way to interface with...

NHibernate mapping: Entity1 -> ValueType1-> Entity2

I have a following domain model: Entity1 -> ValueType1-> Entity2 How can I write the mapping file to represent the above situation (while retrieving Entity1)? PS: I know I can use component tag when value type does not refer to another entity (in this case Entity2). Thanks ...

Is there a standard notation for translating a class into another?

I'm working on an enterprise integration platform which has to translate data structures understood by one system into equivalent structures understood by another. Suppose, for instance, that I have a class Employee: class Employee { private String lastName; private String firstName; private int age; } which has to be transform...

How does one map multiple classes to one table through NHibernate?

I have an Employee class with a Name property of class Name and a Contact property of type Contact. The Name class has two string properties: FirstName and LastName and the Contact class has properties like PhoneNumber and EmailAddress. All of the data is found in one table and assume that it cannot be changed. What would my maps look...

one-to-one fluent nhibernate?

Is it possible yet to do a one-to-one mapping with fluent nhibernate? I have the following as part of an hbm that I'm trying to convert to fluent: <one-to-one name="Person" property-ref="FileData" constrained="true"/> I see a OneToOnePart<OTHER> in the code but i'm not sure how or if this is used to accomplish this. Thanks! ...

relational database and net structure

The company Microsoft could be referred as "microsoft", "ms" or "m$" etc. We may say these names are alias to one single identity. If you want to store the "alias" relationship, you might have to do it as the following pairs microsoft ms ms microsoft microsoft m$ m$ microsoft ms m$ m$...