mapping

nhibernate query all objects implementing an interface

For example, if you have an Apple : IWhatever, and an Orange : IWhatever and you want to find both of them because they are IWhatevers, what do you need to do in NHibernate? Is it completely dependent on the HQL or criteria query, or is there something you must do in the mapping also? If there is a mapping requirement, can Fluent NHiber...

fluent nhibernate mapping

I am trying to create a map to get results as like from below query. I am having hard time to get set Product mapping to set References to Product_Line on 3 columns as in where condition. How can I achieve this using fluent? Product table: cId, ProjID, Line, etc., columns Product_Line table: cId, ProjID, Line, etc., columns select f.* ...

Inverse Mappings

Saying right now: Yes, this is homework. I'm not asking for an answer, but I would love any help into a general direction to look at this problem at. I've been working on it now for hours and have not made any real progress. Can a function, with a well defined inverse, be implemented to map 32 bit integers to 64 bit integers. Do all ...

How can I improve my business layer objects mapping into a database? Is it time for a O/R mapper?

As I began writing web applications with asp.net I started with small projects that used a Linq-To-SQL mapper for database access to a MSSQL Server. After gaining some expierence I switched into a classic 3 tier with Graphic Layer, Business Layer, Data Layer. The only function of the Data Layer was to provide methods insert/update/delete...

Geo-region data for countries/states/oceans

I'm developing an application where entities are located at positions on Earth. I want to have a set of data from which I can determine what region(s) a point is contained within. Regions may be of types: Continent Country Lake Sea DMZ Desert Ice Shelf ...and so forth. I'm envisioning representing each region as a polygon. For an...

Hibernate one to many mapping

Hi, I have two tables: <class name="Content" table="language_content" lazy="false"> <composite-id> <key-property name="contentID" column="contentID"/> <key-property name="languageID" column="languageID"/> </composite-id> <property name="Content" column="Content" /> </class> and <class name...

Using Entities from an Entity Framework (v3.5) Model with Fluent NHibernate

Hi all, Using Microsoft's designer for the Entity Framework (v3.5), I have created an Entity Model (*.edmx) with a generated *.Designer.cs class. I can persist my objects to MS SQL Server using the model without any problems. I am new to NHibernate, and out of curiosity, I now would like to use my model with Fluent NHibernate and SQL...

how to verify if a use-case fits in my design?

We have designed an application, actually a framework, keeping few use-cases/scenarios in-mind. Now we want to verify our design with few other use cases? Are there any tools - probably process tools - to verify if the use cases out there fits into our design? ...

How do I combine GPS track data with another time-coded dataset?

I have GPS track data from a logging device, in GPX format (or any other format, easily done with gpsbabel). I also have non-GPS data from another measurement device over the same time period. However, the measurement intervals of both devices are not synced. Is there any software available that can combine the measurement data with the ...

Hibernate many-to-many mapping

I am one of hibernate user in Australia. Recently, I have been dealing with hibernate many-to-many mapping and not going well though. I got in trouble with "join/associate table with extra columns mapping". Let`s say there are three tables called Product Order and OrderProduct (includes extra column quantity). Product holds many-to-many...

Entity Framework CTP4 Mapping Error

Hi. I was messing around with CTP4 trying to get a feel of how mapping works and i've got this error that i can't figure out. {"A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: 'OwnerID'."} I read around that this was due to my pk being auto generated, but i do not specifically s...

Fluent NHibernate List<string> Length

I have a List that I am trying to get into the DB and am coming up with the following assert: {"ORA-12899: value too large for column \"GDATA\".\"CNVTOOLBOX\".\"TOOL\" (actual: 387, maximum: 255)\n"} I am overriding the automapping with the following: public class CnvRootMap : IAutoMappingOverride<CnvRoot> { public void Override(...

Determine center of bins when using meshm

I am using meshm to plot densities. How do I calculate the center point for each of the bins? I want to associate the data in m with the centerpoints I have looked at the source code of meshm and believe the solution will be a modified version of meshm that returns the latitude and longitudes of each bin's center point. meshm calls th...

Fluent NHibnerate Domain mapping issue

My Domain: public class Person { public Person() { } public virtual int PersonId { get; set; } public virtual string Title { get; set; } public virtual string FirstName { get; set; } public virtual IList<Address> Addresses { get; set; } } public class Address { public Address() {} public virtual int Addre...

"sphere in a bag" plane to sphere projection

Hi! I'm looking for the mathematical transformation to transform points on a 2D plane [0,1]x[0,1] onto the unitsphere. The most common projection would latitude-longitude mapping by interpreting u and v as the angles for the spherical coordinates (map u to [0,2PI] and v to [-PI/2, PI/2]) This gives strong distortions on the poles of t...

an algorithm for finding a map tile by random point on the map

As part of a mapping application, I am implementing a crude sort of tiling. I am looking for an efficient way to know which tiles need to be loaded according to the current map view port. In order to do that, I thought of taking the point in the center of the map (for example) and loading the tile for that point. I need an algorithm f...

ejb3: mapping many-to-many relationship jointable with a simple primary key

often in books, i see that when a many-to-many relationship is translated to a DB schema, the JoinTable gets a compound key consisting of the primary keys of the tables involved in many-to-many relationship. I try to avoid compound keys completely. So i usually create a surrogate key even for the JoinTable and allow the database to fill ...

Can I implement Google maps or another mapping API on my site?

9.1 Free, Public Accessibility to Your Maps API Implementation. Your Maps API Implementation must be generally accessible to users without charge. You may require users to log in to your Maps API Implementation if you do not require users to pay a fee.not require users to pay a fee. I write a web portal and sell it. The co...

Unity Container ResolutionFailedException when the mapping is correct in the config file

I was using a ServiceLocator which i was DIing with Unity public ServiceLocator(IUserStore userStore, IProdcutsStore productsStore, ...etc) {} public IUserStore UserStore { get { return userStore; } } This all worked fine, but I wanted lazy instantiation of the repositories as they have quite sparse use. So my ServiceLocator n...

Doctrine mapping examples using PHPDriver

Hi, I am investigating Doctrine 2 for PHP and I am having trouble finding good resources for how to map using the PHPDriver. There is extensive documentation on using Annotations in comments for the Doctrine mappings, however, I would rather have my mapping definitions in PHP and NOT in comments (for obvious reasons). I could use some...