Hi
In the mapping-file I've defined a bag for Positionen.
<class name="Animag.DomainModels.Models.Abrechnung, Animag.DomainModels" table="Abrechnungen" lazy="true">
<id name="ID" column="ID">
<generator class="native"/>
</id>
<version name="Version" column="Version"/>
<many-to-one name="Kunde" column="KundeID" c...
I'm using fluent-nhibernate conventions to map my entityies:
public class HasManyConvention : IHasManyConvention
{
public void Apply(FluentNHibernate.Conventions.Instances.IOneToManyCollectionInstance instance)
{
instance.Key.Column(instance.EntityType.Name + "ID");
instance.Cascade.AllDelete...
Ive got 2 tables, "projects" and "devices". They are connected through a many-to-many relation in the table "projectsdevices". I want to create a form where the 2 can be linked together. For example on the project detail page I have a option "link device". The link device page should show all devices that are available and not yet linked...
Hi all,
I found several times people asking for the same question but it seems that the answer was never satisfying altough it should be pretty easy (in theory). Here is my question :
I have an entity called "Company" inside which I have an entityCollection "Employees" (one to many). I need to retrieve all Companies and for each of the...
Hello.
My schema looks like this:
The Message.Id column is an identity(1,1), and the MessageHeader table uses a composite key consisting of the associated message ID, and a header name field that uniquely identifies a header within each message.
Entities are represented in code as:
public class Message {
public virtual int Id {...
Hi guys,
In short, the problem is that, when add child object to the collection property of the parent object without explicit setting the parent property of the child object, the insert will fail. Let's take a example:
NOTE: I'm using NHibernate 3.0 beta1.
Example: Product-Category Senario:
(1) Database Schema:
Category (Id, Name)...
Hi,
I have one-to-many relationship between parent and child Java objects. The parent object uses java.util.List that stores multiple child objects. The problem I am experiencing is when updating the parent object after I have added one or more child object(s) to the List in the parent. I am using the saveOrUpdate method to save or upda...
Hello Everyone,
I have a core data database which has (for now) 2 entities Product and CompetingProduct, CompetingProduct relation is set to-many with products.
I create 2 mock Products and 2 mock Competing products and set relation between them .. everything works files.. Saved to database, also NSlog, "po" them.. all is good.
Now.. ...
I have a web service which is essentially a wrapper for a DAO. I am calling the web service/DAO to request a collection of entities.
The "parent" entity class contains a collection of "child" entity objects, i.e. a one-to-many relationship. The DAO method call which fetches the "parent" entity collection (i.e. myDAO.findAll()) retur...
Hi guys,
We have a database of listings that contains 2 million records, each with one or more (of a potential 2500) categories (1:n).
Over time, some listings have been added to many irrelevant categories (some listings have as many as 50 categories where we like to keep it below 5.)
What I'd love to do is audit each category like so...
Hey,
I have two types of accounts (customer and provider), I chose the single-table strategy for persistence. Customer creates Orders (one2many) and provider bids on the orders in auction style (many2many relationship, because he can bid on many orders as well as other providers). My question is, is it possible to have these relationship...
let's say i have the following entities:
public class Order
{
public int OrderID {get;set;};
public int Version {get;set;};
public IList<OrderDetail> Details {get;set;}
}
public class OrderDetail
{
public int OrderDetailID {get;set;}
/// Some other properties
}
when i want to delete the entity like this:
Order order = ne...
I have a database with the following tables:
create table Categories (
Id int primary key,
Name nvarchar(256) not null)
create table Products (
Id int primary key,
Name nvarchar(256) not null,
CategoryId int not null,
foreign key (CategoryId) references Categories (Id))
Using DataLoadOptions, I can write this:
DataLoadOp...