mapping

Is it possible to use different inheritance strategy for subclasses?

I currently have a mapping problem and no idea how to solve it. Here is what we currently have. AbstractEntity is a @MappedSuperclass ExtendedEntity is an abstract @Entity extending AbstractEntity with InheritanceType.TABLE_PER_CLASS Proposal is a subclass of ExtendedEntity that has been stored in a single table so far. Now I want to...

Use Automapper for mapping big domain models to database objects

I would like to use Automapper to map my model objects to database objects. Let say database object is over 30 fields and I want map 10 out of 20 properties from my model. To make it more complex I need to map different properties when I update record than when I insert new record to database. The solution I'm using is to create 2 gener...

iphone mapview bring first and last annotation to the front

I need some code which can be used outside of the mk* functions. I need to run my custom function to bring the FIRST and LAST markers in an array to the front. (so on top of all the other markers on my screen). I have tried [self.view bringSubviewToFront:[[mapView annotations]objectAtIndex: 0]]; I have used [[mapView annotations]objec...

Biztalk 2010: mapping an xsd with a lot of elements with the same name

In Bitzalk 2010 I should map from an input to an XML with the following structure: <REQUEST> <PROGRAM name="PROGRAM123"> <INPUT> <INSTRUCT name="INSTR1"> <FIELD name="FIELD11">VALUE1</FIELD> <FIELD name="FIELD12">VALUE2</FIELD> <FIELD name="FIELD13">VALUE3</FIELD> </INSTRUCT> <INSTRUC...

From java object to xml object

Hi, I've created a web service client from a WSDL file with Axis. This webservice responses with an Axis object that I need to convert to com.bea.xml.XmlObjet. The reverse operation (XmlObject to Java Object) was easily made with Xpath (in weblogic workshop) and the setters of the object but I've been unsuccessfully trying to convert th...

Mapping list of ints in NHibernate

In NHibernate manual I have found mapping like this: <bag name="Sizes" table="SIZES" order-by="SIZE ASC"> <key column="OWNER"/> <element column="SIZE" type="Int32"/> </bag> I can't help wondering why would anyone want to do something like this? Is there something better about mapping plain integers than creating an entity corr...

Hibernate <set> key from joined table

I wonder if it's possible to define Set in Hibernate mapping in a such way, that element would specify not column in original (FOO) table, but in joined one (BAR). Let's say we have some FooContainer.hbm.xml, which contains Set of Foo objects: <set ...> <key column="COLUMN_FROM_BAR" /> <one-to-many class="xyz.Foo" /> </set> Here ...

DataSet to SQL mapping framework?

Hi, I'm developing a system that needs to accept sql queries dynamically. I'm looking for something where someone can define a select query in a file external to the system -- the system would execute the query and return the results as a DataSet. Then the system would read a mapping file (also defined external to the system) that woul...

Is there a way to delete all foreign entities when i delete a record using NHibernate?

I recently began using Fluent Nhibernate for my data layer and have come across an issue. Whenever i want to delete a record that has multiple foreign key constraints, i have to create another class just to represent that database entity. That means that for something like a User record, which has relationships with many other tables, ...

What .NET Map Components are good for heat maps?

Any good .NET mapping component other than Fusion Chart, AmChart (Map) and Dundas Map. Please tell me your experience about your suggestion. ...

Data Structures and their Database Mapping in .Net

Hello. From what I know, complex data structures (tree, binary tree, graph) are not available in the .Net Framework Base Class Library. Is there a good 3rd party library available for this purpose? Further, I need to map these data structures back to a physical database (SQL Server). Is such an extension available? I'd love to have a to...

collection-type argument in Hibernate?

Hello, I was thinking if I could set the list elements type in hibernate mapping files. So far I found this collection-type attribute like here: <list name="privileges" cascade="all" table="user_privilege" collection-type=""> , but I am not sure if I put my list element full class name if Hibernate will generate my domain classes pr...

JPA: how can I extend classes and change the table mapping?

I have created a basic set of classes with methods for doing accounting. My Ledger class allows you to maintain a basic ledger which allows you to obtain the current balance, and to perform transactions on the ledger that adds a new LedgeEntry. I have this generic ledger system working well. Insider Ledger is my LedgerEntry collection...

Mapping result of psycopg2 into dataframe for R with RPY2

Hello Guys, With psycopg2, i get result of query in this form : [(15002325, 24, 20, 1393, -67333094L, 38, 4, 493.48763257822799, 493.63348372593703), (15002339, 76, 20, 1393, -67333094L, 91, 3, 499.95845909922201, 499.970048093743), (15002431, 24, 20, 1394, -67333094L, 38, 4, 493.493464900383, 493.63348372593703), (150024...

Mapping certificates to custom user database on IIS 6

How can I do many to one certificate mapping to a user from a custom user database on IIS 6. I don't want to use the domain users to be mapped with these certificates. Do I have to do this using code? ...

Configuring Eclipse .classpath for two different paths for the same entry

Hi everyone, I'm wondering if there is a way (in Windows 7) to make some sort of mapping of drives so that sometimes you find the files in a network drive and sometimes you find them in a local map? -And to be able to easily switch between those two. The reason I want to do this is that I want to be able to work (as a developer, using ...

Grails relationships with static mapped tables

For the life of me I cannot seem to get relationships to work on mapped tables with Grails. I have two domains I am trying to join, Resources and Cassettes. A Resource can have many Cassettes. If i run the code below using scaffolding I get an error "Unknown column 'this_.cassette_id' in 'field list'". If i try to define the cassette_i...

Fluent nhibernate : HasManyToMany mapping exception

Hello everybody. I'm having issue when I use Fluent nHibernate for mapping entities with my SQL database. To understand the problem, here is an example. This example modelizes via SQL tables a mail box, that allows users to put their mail in one or many folder (like the label system in gmail). // contains every users USER ( Id (b...

Hibernate, mapping of foreign keys that have been generated by a sequence in the parent table

I have a 1:n relation in the database and java objects that represent the relation with hibernate. The primary key of the parent table is generated with a database sequence, the child object uses the primary key of the parent object as foreign key. I create a new parent object including a set of new child objects. Then I try to persist ...

hibernate + grails error and question

I just changed all of the classes in my grails project to a new package. This involved adding the package syntax, and creating the folder structure accordingly. Now I am getting the following hibernate.MappingException: 2010-09-23 15:31:16,755 [main] ERROR [localhost].[/SkillsDB] - Exception sending context initialized event to listene...