mapping

Change mapping in the session

I have a Informatica session which is linked to a wrong mapping. How do i change the mapping from M1 to M2 in the same session S1 and Workflow W1 WITHOUT importing/exporting as XML and making the changes ??? ...

Hibernate subclass with foreign key relationships

I need some help defining the following object hierarchy/ database relationship in Hibernate From the object sense – Agent is inherited from Person and Agency is inherited from Organization. they are inherited from Party which can have multiple Addresses associated with it The database consists of Agent -ID -Name -PartyID (referenc...

NHibernate bag is always null

I have set up my mapping file and classes as suggested by many articles class A { ... IList BBag {get;set;} ... } class B { ... A aObject {get;set;} ... } <class name="A">...<bag name="BBag" table="B" inverse="true" lazy="false"><key column="A_ID" /><one-to-many class="B" /></bag>... <class name="B">...<many-to-one name="aObject" cla...

hibernate modeling relationships managed through an intermediate table

I have a datamodel that has an intermediate table to manage relationships between entities. For example, tables Person and Organization are related through the Relationship table Party (table) - ID Person (table) - ID (references Party.ID) - name Organization (table) -ID (references Party.ID) -name Relationship (table) -ID (PK...

Get Degrees (0-360) from One LatLng to Another in JavaScript

Can someone help me fill in the blanks with native JavaScript? function getHeading(lat1, lon1, lat2, lon2) { // Do cool things with math here return heading; // Should be a number between 0 and 360 } I've been messing around with this for a long time and can't seem to get my code to work right. ...

How to correctly set up routes when creating a new view in Ruby on Rails?

I created a new action called "asked". asked.haml is in views/questions as it should be. I've also added def asked respond_to do |format| format.html format.xml { render :xml => @questions } end end to the Questions controller for this action. My problem is that when I got to the url http://localhost:3000/q...

Hibernate multi column discriminator

I have a single lookup table that manages all lookups - legacy and new lookup table structure is context,name, code, value context is either legacy or new name is the name of the lookup - state, status etc...for example code is the code and value is the value associated with the code Is there a way to specify multiple columns as discri...

Mapping tables from an existing database to an object -- is Hibernate suited?

Hello! I've got some tables in an existing database and I want to map them to a Java object. Actually it's one table that contains the main information an some other tables that reference to such a table entry with a foreign key. I don't want to store objects in the database, I only want to read from it. The program should not be allow...

standard geographic tilizing/binning method?

I'm trying to learn and understand more about mapping and displaying values on a map. (GIS) At the moment I'M looking to take some values and apply those values to a tile or bin on a map. Ideally I'd like the tile sizes to be uniform, like 100 meters, 500 meters, etc. Is there a standard method for creating uniform tile sizes? Or Are ...

What is a good solution to link different tables in Hibernate based on some field value?

I have article table and several user tables a_user, b_user, ... with exactly the same structure (but different data). I can't change anything in *_user tables except their table name prefix but can change everything else (user tables contain only user information, there is nothing about article or user_type in them). I need to link art...

How can I eager-load a child collection mapped to a non-primary key in NHibernate 2.1.2?

Hi, I have two objects with a many-to-many relationship between them, as follows: public class LeftHandSide { public LeftHandSide() { Name = String.Empty; Rights = new HashSet<RightHandSide>(); } public int Id { get; set; } public string Name { get; set; } public ICollection<RightHandSide> Right...

GoogleMaps API extracting building shape information.

Hi, I'm looking for a way to extract building shape (polygon) information from google maps automatically. It appears that you can only downloaded information relating to shapes you've created yourself. Example here. Information relating to building shape and height is stored by google, so I'm hoping there's a way to extract it. ...

MySQL GIS and Spatial Extensions - how to map regions and query against them

I am trying to make a smartphone app which will return a list of users within a certain proximity, say 100m. It's easy to get the coordinates of my BlackBerry and write them to a database, but in order to return a list of other users within 100m, I need to pull every other record from the database and compare the distance between the tw...

Using LINQ to map dynamically (or construct projections)

I know I can map two object types with LINQ using a projection as so: var destModel = from m in sourceModel select new DestModelType {A = m.A, C = m.C, E = m.E} where class SourceModelType { string A {get; set;} string B {get; set;} string C {get; set;} string D {get; set;} string E {get; set;} } c...

How to map a search object to a class with more fields with JPA annotations

Hi all, I'm a newbie with JPA. I need to map a search object to a table. The search object has only and id, name. The big object has more fileds id, name, adress and more. I use this as big object view plaincopy to clipboardprint? I use this as big object @Entity @Table(name="users") public class User { @Id @GeneratedValue(strate...

How one extends JNA interface mappings? (Java)

User32 interface (platform library) is missing some WinAPI functions, so I tried extending it: package myapp import com.sun.jna.platform.win32.W32API public interface User32 extends com.sun.jna.platform.win32.User32 { myapp.User32 INSTANCE boolean IsWindow(W32API.HWND hWnd) } But then calling myapp.User32.INSTANCE.FindWindow(...

Adding a JPanel to another JPanel having TableLayout

I am trying to develop a map editor in Java using TableLayout. My map window receives as a constructor a Map object. From that map object i am able to retrieve the Grid and every item in the grid along with other getters and setters. The problem is that even though the Mapping extends JComponent, when I place it in a panel it is not pain...

Haskell - mapping the odd placed values and the even placed values differently

Hey guys, is there an easy way. To take a list of numbers, say 123456. Then multiply the odd placed by three and the even placed by 1. i.e. (1 * 3) + (2 * 1) + (3 * 3) + (4*1) + (5*3) + (6*1) i was thinking the map function somewhere along the lines. But i don't know how to map *3 to just the odd placed values. Oh and if you could giv...

NHibernate complex one-to-one mapping

There is a table A containing common unversioned data for entities. There are also tables B,C,D with versioned data of particular entity type. All of these tables are referencing table A. The task is to add a mapping of a property of entity's type, for example, stored in table B, which would reference table A, and specify a rule how ent...

Question : Perl map - need to map a array into a hash as arrayelement->array_index

Hi folks. I have a array like this: my @arr = ("Field3","Field1","Field2","Field5","Field4"); Now i use map like below , where /DOSOMETHING/ is the answer am seeking. my %hash = map {$_ => **/DOSOMETHING/** } @arr Now I require the hash to look like below: Field3 => 0 Field1 => 1 Field2 => 2 Field5 => 3 Field4 => 4 Any help? ...