I'm trying to do a mapping for the following classes:
public class A {
public virtual int Id { get; private set; }
public virtual IDictionary<MyEnum, B> MyBValues { get; set; }
}
public class B {
public virtual int Id { get; private set; }
}
public enum MyEnum { Value1, Value2, Value3 }
I'd like the resulting tables to look...
I have two tables: Address and Contact which are joined on contactID (in Contact). Both of these tables have entities in my Entity data model (EF 4.0) and I do not wan't to modify them.
I do want to create a new entity that contains information from both entities.
What I did so far:
In CSDL:
<EntityContainer...>
<EntitySet Name="...
Hello!
This is my first post on Stack Overflow! (yay!)
I'm having trouble with a Castle ActiveRecord mapping, which I thought would be a pretty common scenario, but maybe I didn't "google" right.
I have one entity called Product, and another entity called Warranty. Product has two properties on it (among others), each of type Warrant...
I've been trying to use AutoMapper to save some time going from my DTOs to my domain objects, but I'm having trouble configuring the map so that it works, and I'm beginning to wonder if AutoMapper might be the wrong tool for the job.
Consider this example of domain objects (one entity and one value):
public class Person
{
public st...
Trying to use nhibernate on sql-server compact edition for unit testing and having some trouble. At the moment I just have one entity which is:
<class name="Audit" table="eolaudit_llk">
<id name="ID" column="eolauditlk_ky">
<generator class="identity"></generator>
</id>
<property name="Name" column="eolauditlk_nm" />
<property name=...
Basically I'm running the same problem as this post http://stackoverflow.com/questions/2669672/accessing-mapped-drives-when-impersonating-in-asp-net
I'm working on a legacy website and I need to allow the admins to change the site's logo, banners, etc, from an image file on their desktops to a mapped drive on the server.
So, their webs...
I have the following classes:
public class A {
public virtual int Id { get; private set; }
public virtual IDictionary<MyEnum, B> MyBValues { get; set; }
}
public class B {
public virtual int Id { get; private set; }
}
public enum MyEnum { Value1, Value2, Value3 }
And would like the following tables:
A
------------...
I have some OneToMany child collections in my domain classes that may grow over time to hold hundreds or (very likely) thousands of instances. However, often times the only thing the parent really needs is the "first" child or the "last" child or the "biggest" child. Having the parent instance loop through a large collection of objects...
Hi,
I have a database with multiple schemas: Security, Trade, etc.
Each shema has multiple tables. Ie. Security schema has: Users, Roles etc..
Now, can I setup nhibernate so that the schema i bound to namespace.
Ie. I have a security namespace in my project with the User and Role POCOs in it.
So I wont to set bind database schema to nam...
Whenever I see Ruby code that says:
arrayNames.collect { ... }
I forget what collect is and have to look up what it is, and find that it is the same as map().
Map, I can understand, mapping 1 byte to a pixel, and function is to map an x to a y, a 2 to a 4, a 5 to a 25, etc. But where does the name "collect" come from? Maybe that wi...
Hi,
I made a commen on this question:
http://stackoverflow.com/questions/2761255/extending-fluent-nhibernate-mappings-in-another-assembly
The person who asked that question got misunderstood and I want to know if its possible to do what he asks.
Simply put:
Running application with an entity
public class Product
{
public virtua...
Is there a tool to automate the task of finding out where a given JSP is used, by URL?
Ultimately, the question I need to answer is, What URL(s) do I need to call, to see the output of this JSP in my browser?
Finding out involves searching for the JSP name, then searching for any JSPs that include it (possibly through several levels), ...
Hi,
I have a table T1 that has these columns:
ID (int) - is a primary Key
Ref (int) - (not null)
Name (string)
And a second table T2 with columns:
T2ID (int) - is a primary key
Value1 (int)
Value2 (int)
SomeOtherData (int)
Each record from T1 has >2 records in T2: Ref column in T1 has a value from T2 table, T2ID column.
How to ...
I think its quite usual task, but still solutions I saw look not so nice.
For example in Qt used approach based on MVC pattern -- you must assign all connections manually.
Or I remember one PHP engine where pages were creating from DB schema.
Which are other approaches? Which one you are prefer? What are the best practices?
...
What is the correct mapping type from MySql data type text to java using hibernate?
@Column(name = "STACKTRACE", length = Integer.MAX_VALUE)
public String getStacktrace() {
return this.stacktrace;
}
...
Is there a way to map (using xstream) a List<Person> to <friends> and List<Things> to <stuff> for example?
Thanks!
...
Hi all. I hope you can help somewhat novice to NHibernate with the following question.
Suppose we have two table: Page and WorkPage. Page table contains unversioned data and WorkPage contains versioned Data of the same Page, i.e. there is a relation one-to-many between Page and WorkPage.
In the code we have an entity containing all of t...
How to create mapping in hibernate that depends on the type property, insert/retrieve the data into/from proper column.
Structure:
TABLE COLUMNS:
|TYPE | CHARACTER | DATE | TIME | NUMERIC|
POJO:
class Pojo {
private int type;
private Object data;
...
}
Examples:
Insert/Update
If the type is 1 we input the value to colum...
Hi,
I have the following map in my entity:
<map cascade="all-delete-orphan" inverse="true" name="ManyToMany" mutable="true" table="ManyToManyTable">
<key column="TableAId" />
<index column="EnumValueId" type="MyEnum, MyAssembly" />
<many-to-many column="TableBId" class="MyBClass, MyAssembly"/>
</map>
This creates the table fine...
right now i can show current and destination now i want a dummu pin in midway say any location but i want to know how to add 3 pins in mapif(annotation != mapView.userLocation)
{NSLog(@"marked");
static NSString *defaultPinID = @"com.invasivecode.pin";
pinView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotati...