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 no problem.
But, on maps, borders of this...
Hi,
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, nullable=false)
public getInfoList() {...
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?
...
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 { get; set; }
public virtual string Name ...
Hi,
I'm trying to do the following thing:
ICriteria criteriaSelect =
session
.CreateCriteria(typeof(Employees))
.CreateCriteria("Orders")
;
var test = criteriaSelect.List();
With:
public class Orders{
public virtual int OrderID { get; private set;}
}
public c...
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 column="trainId"/>
<one-to-many class="Trip"/>
</set>
<...
Hi, 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("Users");
Id(x => x.UserName).Generat...
Friends, 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.
...
Hi,
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 mobile device -it will be in a car perm...
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.
Airlines
varchar2(3) airlineCode //PK
varchar2(5...
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 hashes are spread across the entire integer(32 ...
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 session=sessionFactory.OpenSession();
IList<Cus...
Hi,
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.SAVE_UPDATE)
@JoinColumn(name="TEAM_ID...
Hi,
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", action = "Contact" });
This successfu...
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 -111.8660 2
3 2200 S 700 E 40.72298 -111.8...
Hi all,
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. So for example if the object has ...
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?
...
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
HasManyToMany(x => x.Items)
.Table("S...
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 pure HTTP I would look at doing this with...
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">NHibernate.Connection.DriverConnectionProvider</property>
<prope...