mapping

How can read-only collections be mapped in JPA / Hibernate that don't cause DB updates.

Hi all, is it possible to create relations in hibernate / jpa that are fetched when the containing entity is fetched but will never ever result in any db updates, when the containing entity is saved? I'll try to make the requirement clear by an example. I have a simple entity B @Entity public class B { private int bId; @Id ...

How do I map Grails Searchable plugin across more than 2 domain objects?

I'm using the Searchable plugin in my Grails application, but am having trouble getting it to map across more than 2 domain objects while returning valid search results. I've looked through the Searchable plugin documentation, but cannot find the answer to my question. Here's a very basic example of the domains I have: class Article {...

Free for commercial use google-maps equivalent to do the following?

I'm looking for a mapping API something which has similar functionality to Google-maps but which perhaps has something along the lines of the Apache / MIT license. I basically want to plot points on the map. Does such a thing exist? If so are there any guides to plotting points on this map API? ...

Map a class in XAML that isn't in a namespace

Yes I know this is considered bad practice, and for the most part I actually agree (i.e. no need to debate that point) but I'm wondering if it's possible to reference in XAML classes that aren't contained within a namespace. In other words, root-level classes. Again, I know this is bad practice, but I am curious. (BTW, yes I know abou...

Satellite Map Analysis for Building Generation

Has anyone every heard of a program which analyses a satellite map and attempts to generate three dimensional buildings that roughly match the length/width of their real life counterparts? The use in programs like Google Earth would be phenomenal, and it would be particularly amazing for projects like FlightGear. I'm just about to star...

DTO to DO - How to flatten DTO's into a DO collection property

I would like to flatten a collection of DTO's into a single DO using LINQ, but my LINQ-fu is weak. My DTO looks like this: public class DTO { Product product, Location location, MonthPeriod month, double Data } and maps to a SQL database table with this schema: ProductID int, LocationID int, MonthPeriodID int, Data numer...

Alternatives to Mapping and Visualisation Software like Xanalys

I was wondering if there are any mapping and visualization software like Xanalys. I am actually looking at Xanalys Link Explorer that allows you to map out the associations between different objects from a database. Seems to be very useful for investigative kind of work. ...

Asual Jquery Address plugin - problem on Google chrome

I have recently used the Asual Jquery Address v.1.3 and it workes successfully with Firefox but I found the following problem in the Chrome: it can't fire the ExternalChangeFunction envent and there is no alternative from using this event because document.ready fires again when trying to change the address by this script plugin $.addres...

Same business entity for identical tables?

I got a legacy database which have about 10 identical tables (only name differs). Is it possible to be able to use the same business entity for all tables without having to create several classes/mapping files? ...

Tools to convert database tables to c# classes

Is there any free tool or plug-in for Visual Studio to convert the SQL tables to entity,model,facade and DAO classes? I am working on SQL server 2008, Visual Studio 2008 and C#. ...

How to enable Map Local over https with Charles Proxy?

I'm using Charles Proxy's handy Map Local tool to develop CSS documents. This way I can immediately see my edits without having to redeploy the whole thing which in the wonderful world of enterprise-level webapps saves a considerable amount of time. I just discovered that Map Local doesn't work with the https protocol. I have no problem...

Delegated - is correct my usage of delegates?

Hi, I created a class where the main task is get data from the DB and mapping it to some object. The problem is the same class needs to map different datareader to different object. So, what I tried to do is to get out the mapping method using delegates. Here is part of my code. See the important rows in bold. public class GetDetails<...

Entity Framework, mapping Views to Tables

Hi, I have a basic view that returns the same columns as a table (give or take 1 field) in my DAL code, i am returning a list of MyTableObject, however in some cases, i will call the view to return the same data, but from different sources. List<MyTableObject> tableObjects = new List<MyTableObject>(); if (case1) tableObjects = ent...

What are the advantages of using automapper?

Hey all, My question might be silly, but I'm pretty sure I miss a very important part of the issue. I have to do some object to object mapping (between domain classes used in C# project and classes which are sent to flash clients). My first choice was Automapper. But Ive had some issues with it (nested properties, not paramterless cons...

Fluent NHibernate Hierarchical Data Question (One Table Per Hierarchy)

I am having some trouble depicting a DataBase Setup in NH. I have the following Classes: public class BaseData { public virtual long Id { get; set; } } public class ExtendedData : BaseData { public virtual string Name { get; set; } } The backing tables look like the following: BaseTable -------...

Grails: domain class mapping (collection of hibernate user types)

Hello, I am wondering if is possible to implement following domain model. Let's have a domain class which contains set of intervals (joda time). I can use org.joda.time.contrib.hibernate.PersistentInterval hibernate user type for mapping of Interval to database table (by similar way as in http://www.grails.org/JodaTime+Plugin). However...

Dozer: Deep Mapping not working

Hi all, Quick question: I'm using Dozer to make mappings between two different classes. In my destination class (A in this example), I have a field which is an instance of a Name object. This object has two strings (last- and firstNames). These strings are build by inputting a list of strings and joining them together with a separator. ...

Entity Framework: mapping tinyint to boolean

by default Entity Framework maps tinyint to byte. i tried changing the underlying type after it was generated to Boolean, but getting compilation error Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=False,DefaultValue=]' of member blah... is this possible in 4.0? it wasn't my idea to use tinyint column as b...

hibernate mapping files

I have a table for class UserStatus ( userId varchar, statusId bigint). Set statusId to autoincrement and specify userId as primary key for some optimisation because most request goes with userId. Using Eclipse. After reverse engineering receive such file: <class name="xxx.UserStatus" table="user_statuses" catalog="xxx"> <id nam...

NHibernate Property Mapping, best practise for type attribute?

I have a little doubt for mapping of property in hbm file. Sometimes I've mapped the string field of my db in this way: <property name="MyPropName" column="MyColumnName" length="20" /> but the same mapping can be wrote in this way: <property name="MyPropName" column="MyColumnName" type="String(20)" /> my question is...what's the b...