mapping

Fluent NHibernate - Map only a few classes in assembly

Hi, I have a entity project which holds about 30 classes and this project is used in several web applications. One application maybe uses all the 30 classes but another one only uses 3 classes. So my question is: How can I add just the classes that a uniqe application needs? My first thought was to add the names of the needed classes i...

Fluent NHibernate View Mapping requires Id Column

Hi Trying to use FNH to map a view - FNH insists on having a Id property mapped. However not all of my views have a unique identifing column. I can get around this with XML mappings as I can just specify a <id type="int"> <generator class="increment"/> </id> at the top of the mapping. Is there any way to duplicate this i...

Big problem with fluent nhibernate, c# and MySQL need to search in BLOB

I've done a big mistake, now I have to find a solution. It was my first project working with fluent nhibernate, I mapped an object this way : public PosteCandidateMap() { Id(x => x.Id); Map(x => x.Candidate); Map(x => x.Status); Map(x => x.Poste); Map(x => x.MatchPossibility); Map(x =>...

Question about [literally] mapping location based on an IP address.

I've been bored lately and I want to start a new project. I was looking at a website mentioned in a different question (http://www.grapevinegame.com/), and I thought the map and how it plots a point based on someone's IP (I assume) is pretty nifty. I want to do something like that, but I have no idea how it's done. I know you can get lat...

WPF / Silverlight - Mapping API

I am about to start on a project where I need to display maps with cross streets and possibly directions. I know there are a lot of API for the web, but I was wondering what the best solution is for a desktop application. I know of Bing Maps and I believe there are some Google Maps solutions out there as well. Any help or information...

Automatic database schema generation and migration with Perl

In Ror or Django or web2py you can "describe" a database (as a set of classes that remaps to tables) and the framework (having being provided with a connection string to the desired database) generates the tables, fields, relations and in the case of RoR and web2py it also keeps it up-to-date (eg, removing a class drops the table, adding...

Oracle Data Provider to CLR type mapping

Where can I find the listing of ODP to CLR type mapping? On Oracle database, the NUMBER(9,0) type comes out in .NET app as System.Decimal from the MS Oracle driver, but as System.Int32 from ODP driver. I need an exact specification of types coming out from database (not the CLR to DB parameter mapping). ...

What is the "Entity" refering to in fluent Nhibernate Mapping Configuration?

I am trying to learn fluent nhibernate better so am doing a basic sample application from scratch, instead of using someone elses framework. However, I am finding I really don't understand what is going on in assigning mapping files. I have seen a lot of code examples which are all showing the same code, but nothing that spells it out. N...

Mapping Application for Middle East

We have a desktop application that has been using MapPoint for displaying data on a European map. We now want to support Middle East maps, but MapPoint only support North America and Europe. Is there any other alternative to MapPoint that can be easily integrated in a .NET based Win Forms application? ...

How to map this to something readble in Java ?

How do I map : "10%3A23%3A54+Apr+23%2C+2010+PDT" to something readable in Java ? Frank ...

Best approach to convert XML to RDF/XML using an ontology

I have an XML which uses the XPDL standard (which has an XML schema). What I'm trying to do now is to convert its content to RDF format (serialized in XML), in terms of a certain ontology. Clearly, there needs to be some sort of mapping here. I would like to do this using PHP. The thing is, I have no idea how to do this best. I know how ...

Interactive World Map, highlight countries on mouseover

I need to create an interactive world map on the front page of a site, the view portal will be about 650x200 pixels. The interactivity would include the following, mouse-over a country would highlight (the countries are will literally be filled with "red" for example) that country and display the countries' name (preferably text in a di...

Good examples of MapServer / OpenLayers

I want to convince some clients to use MapServer and OpenLayers. Please can anyone suggest attractive websites to show off the possiblities! The clients will be impressed by: A density map (otherwise known as a heat map, colour-shaded grid coverage, contour plot...). The ability for the user to download the underlying data for the ...

efficient list mapping in python

Hi everyone, I have the following input: input = [(dog, dog, cat, mouse), (cat, ruby, python, mouse)] and trying to have the following output: outputlist = [[0, 0, 1, 2], [1, 3, 4, 2]] outputmapping = {0:dog, 1:cat, 2:mouse, 3:ruby, 4:python, 5:mouse} Any tips on how to handle given with scalability in mind (var input can get rea...

What is the best way to store three attributes entry sets in Java?

HashMaps allow for mapping key value pairs; what is the recommendation if there is an extra value? i.e HashMap maps key-value pairs: Key, Value What is the best way to map: Key, Value, Value1? Thanks. ...

How to enforce DB field size limit to related Java String?

What is the correct way to defend against trying to store more text than can be accommodated in a VARCHAR2 database field? Say the PARTNER_ROLE field of the REGISTRATIONS table is declared as VARCHAR2(80). This field is mapped in the Registration class in Java as public class Registration { @Column(name=”PARTNER_ROLE” length=”80”) ...

What is the "owning side" in an ORM mapping?

I'm new to JPA. Now I have a question: what exactly does the owning side mean? I only have a rough idea of it. What is an explanation with some mapping examples (one to many, one to one, many to one)? PS: the following text is an excerpt from the description of @OneToOne in Java EE 6 documentation. You can see the concept owning side in...

Representing geographical points/polygons in Python/Django

I'm building a website in Django, and I want one of my datatypes to be a geographical polygon. I want to mark points on a map (say, in Google Maps) and then store the resulting polygon in the database. Is there any way to do it that will save me the work of typing all the longitudes and latitudes manually? I guess I'm looking both for...

Hibernate mapping to object that already exists

I have two classes, ServiceType and ServiceRequest. Every ServiceRequest must specify what kind of ServiceType it is. All ServiceType's are predefined in the database, and ServiceRequest is created at runtime by the client. Here are my .hbm files: <hibernate-mapping> <class dynamic-insert="false" dynamic-update="false" mutable="true"...

Problem with Mapping/Casting Linq-to-Sql on different Types

Hi, maybe someone can help. I want to have on mapped Linq-Class different Datatype. This is working: private System.Nullable<short> _deleted = 1; [Column(Storage = "_deleted", Name = "deleted", DbType = "SmallInt", CanBeNull = true)] public System.Nullable<short> deleted { get { return this._dele...