3
голосов
5ответов
2727 просмотров

Creating custom Google (or OpenLayers?) maps

I'm currently working on a project which maps items to a physical location within a building. We have a map created in our GIS system (ArcGIS), and are able to resolve items to the appropriate shape ID on this map. We want to create a web map using one of the APIs such as Google maps or Open Lay...

0
голосов
1ответов
177 просмотров

fluentnhibernate and virtual entities

Why fluentnhibernate (v. 1.0) when you map the entities (not using automap), all must be virtual, even those that are not mapped? There is a way not to set props / methods virtual ? Mic.

4
голосов
1ответов
3009 просмотров

Calculate Y position from latitude in degrees on mercator projection

I'm trying to calculate the Y position on a map with mercator projection given the latitude in degrees. Here's what I need: //mapHeight might be 600 (pixels), for example //latitudeInDegrees ranges from -90 to 90 public double CalculateY(double mapHeight, double latitudeInDegrees) { //what o...

2
голосов
1ответов
1981 просмотров

Entity key of a view as navigation property

I have a table CREATE TABLE Tasks ( ID INT IDENTITY(1,1) NOT NULL CONSTRAINT PRIMARY KEY PkTasks, ...other fields... ) and a view CREATE VIEW VTaskInfo AS SELECT T.ID IDTask, ...other fields... FROM Tasks T How can I create navigation property connecting 'Task' and 'VTa...

0
голосов
3ответов
1546 просмотров

Hibernate Immutable Value Object

customer = // get customer from the current hibernate session // customer has a discount with database id of 1 Everything is fine until here. But if I call: discount = SpecialDiscount.create("10%"); customer.setDiscountTo(discount); session.save(customer); // customer has a discount with data...

0
голосов
2ответов
1137 просмотров

NHibernate base and derived class mapping

Situation: I have a class MyClass and its "lightweight" version MyClassLite, so i have public class MyClass : MyClassLite I also use hbm file for mapping my classes (they are mapped to the same table). The thing is that when i try to get a list of MyClassLite entities, i get not only MyClassLi...

3
голосов
2ответов
9101 просмотров

British National Grid Shapefile - convert to WGS84 Lat/Lon

I have a set of ESRI shapefiles which, I'm told, have been written using the British National Grid coordinate system. I need to convert these files to WGS84 lat/lons, for onward conversion to KML files. I'm having trouble doing this as follows: If I open each of the original files in MapInfo Pro...

0
голосов
1ответов
118 просмотров

Mapping to an element of an array

I have a class Parent wich contains an array of 3 Child class objects (Child[] ChildArray). I have a Database Table MyTable with fields [FLD_01], [FLD_02], [FLD_03]. How do I map [FLD_01] to ChildArray[0], [FLD_02] to ChildArray[1] etc?

2
голосов
2ответов
1106 просмотров

How to Map oracle datatype SYS.XMLTYPE in Nhiberbate

I have a table in oracle having column of datatType SYS.XMLTYPE and have to map it in Nhibernate hbm to retrieve the XML. I am using C# with .net framework 3.5 is there any specific dataType available to map this or can i use byte[] or char[] for mapping? Thanks Arvind

2
голосов
3ответов
1586 просмотров

nHibernate & sqlite mappings

I'm having real problems with setting up nHibernate with sqlite. Here is the hibernate.cfg.xml file: <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.provider">NH...

0
голосов
2ответов
440 просмотров

Which method to use to set up a dynamic port mapper

I have a web app which relies on a number of back end services, and I would like to be able to dynamically switch between different instances of these services. So the thinking was to create an intermediate app which listens on some ports and redirects traffic as required. If I was dealing with...

1
голосов
1ответов
2200 просмотров

FluentNHibernate mapping to a view

I have a many to many relationship between entities and there is a table view acting as a lookup table defining the relationship. I'm curious how to map to a view as opposed to a table within a database. ie, Table mapping: public SomeMap() { Id(...)//set Id and other mapped properties ...

0
голосов
2ответов
1479 просмотров

Win7/IIS7 - why does a new Handler Mapping diasappear?

I add a handler mapping to IIS7 (on Win7). It runs just fine until I publish a new build to http://localhost. Once I publish a new build, all the mappings I added are magically gone!! [EDIT] I am also losing all of my virtual directories during a publish. [/EDIT] Any tips/tricks for this?

0
голосов
1ответов
175 просмотров

Programmatically switch the ID generator in NH mapping file

So I'm currently attempting to do a promotion of objects from one database to another in my app. Basically I want to allow the user to click a button and promote changes from staging to production, as it were. To do this, I really want to keep the IDs the same in order to help with debugging. ...

6
голосов
2ответов
2393 просмотров

Help plotting Geographic Data in R using PBSMapping and Shapefiles

Using O'Reilly's Data Mashups in R as inspiration, I'm trying to plot a handful of addresses on a shapefile of Salt Lake County, Utah found here. I have data frame geoTable: > geoTable address Y X EID 1 130 E 300 S 40.76271 -111.8872 1 2 875 E 900 S 40.74992 -...

1
голосов
3ответов
303 просмотров

MVC Route Question

I am trying to map an action with no controller to a specific action, However, I do not want to show the controller in the URL. I have partially achived this using the mapping shown below: routes.MapRoute( null, "Contact", new { controller = "Home", ac...

1
голосов
1ответов
889 просмотров

Hibernate lost reference after calling save. Do you know why?

Take a look at the following classes (UNIdirectional @OneToMany) @Entity public class Team { private Integer id = -1; @Id @GeneratedValue public Integer getId() { return this.id; } private List<Player> playerList; @OneToMany @Cascade(CascadeType...

0
голосов
3ответов
594 просмотров

Problem in mapping Northwind Customer with NHibernate

As a beginner on NHibernate (2.1.0), I am trying to set up my first unit test using the famous Northwind database. The test goes like this (the configuration files can be found at the end of this question) : ISessionFactory sessionFactory=new Configuration().BuildSessionFactory(); ISession sessi...

0
голосов
3ответов
230 просмотров

Mapping integers onto the entire range

I'm using a hash table (DotNET Dictionary object) as part of a sparse two-dimensional data set. Most of the entries in the hash table will be close together. I'll probably end up with 100 ~ 10,000 entries, all of them clustered near zero. I've read that a Hash table performs better when the hashe...

0
голосов
1ответов
1838 просмотров

Fluent Nhibernate causes System.IndexOutOfRangeException on Commit()

Hey there. I have been trying to figure out how to configure the mapping with both NH and FluentNH for days, and I think I'm almost there, but not quite. I have the following problem. What I need to do is basically map these two entities, which are simplified versions of the actual ones. Airlin...

0
голосов
1ответов
197 просмотров

What is the best mapping software to use for mobile navigation devices?

I'm starting to work on a project that involves integration with the mapping software on a navigation device. Ideally the navigation device will be touch screen, and we will be able to write code that controls the navigation/mapping software on the device (we want to send info to and from the mo...

233
голосов
9ответов
155704 просмотров

any tool for java object to object mapping?

I am trying to convert DO to DTO using java and looking for automated tool before start writing my own. I just wanted to know if there any free tool available for the same.

1
голосов
1ответов
1190 просмотров

Fluent NHibernate HasManyToMany() Save/Update Problem

i have the following code, which is supposed to give specific functionality but it isn't :S anyway, here's my problem: http://img525.imageshack.us/img525/1315/diagramp.png here's the mapping code: public class UsersMap : ClassMap<User> { public UsersMap() { this.Table("...

17
голосов
2ответов
20054 просмотров

Mapping a list in hibernate by ordering instead of an index-field

This works: <hibernate-mapping> <class name="Train" table="Trains"> <id column="id" name="id" type="java.lang.String" length="4"> <generator class="assigned" /> </id> <set name="trips" cascade="all"> <key...

0
голосов
1ответов
190 просмотров

nHibernate Criteria query with missing mapping

I'm trying to do the following thing: ICriteria criteriaSelect = session .CreateCriteria(typeof(Employees)) .CreateCriteria("Orders") ; var test = criteriaSelect.List<Orders>(); With: public class Orders{ public v...

3
голосов
3ответов
2728 просмотров

How to cascade Save with CompositeId in NHibernate?

I have a simple three table DB with many-to-many relation. A(id, Name) B(id, Name) AB(AId, BId) references A and B The corresponding classes: public class A { public virtual int Id { get; set; } public virtual string Name { get; set; } } public class B { public virtual int Id { g...

0
голосов
1ответов
1674 просмотров

Get map position when WGS-84 lat/lon when upper left and lower right corners' lat/lon are given

Suppose I have a map, for example from openstreetmaps.org. I know the WGS-84 lat/lon of the upper left and lower right corner of the map. How can I find other positions on the map from given WGS-84 lat/lon coordinates?

3
голосов
2ответов
1969 просмотров

A Stackoverflow mapping (Hibernate)

Suppose a mapping like this one @Entity public class User { private Integer id private List<Info> infoList; @Id public getId() { return this.id; } @OneToMany(cascade=CascadeType.ALL) @JoinColumn(name="USER_ID", insertable=false, updateable=false,...

1
голосов
5ответов
438 просмотров

Drawing dashed borders

Imagine you are drawing a map of county borders. You are given a set of polygons, one for each boundary, and you draw each polygon. In places where two counties share a border you just end up drawing the border twice. In the absence of partial transparency effects, and with a solid pen, this is ...

1
голосов
1ответов
1050 просмотров

Good object structure for results of my Hibernate left outer join

I need to make an outer join query that retrieves all of the definitions and any properties they have associated with them that are associated with a certain company. I have two Hibernate models objects: class PropertyDefinition { @Id private Long id; @Column private String...