I am using Tier Developer by alachisoft for OR Mapping .It is not effective as well as flexible.Please suggest me a mapping tool for dot net which is free/open source.It would be great if I get the nae of the most preffered tool.
...
i have class named Group
i tried to test configuration:
var cfg = new Configuration();
cfg.Configure();
cfg.AddAssembly(typeof (Group).Assembly);
new SchemaExport(cfg).Execute(true, true, false);
when i debug this, im getting following sql:
create table Group (
ID INT IDENTITY NOT NULL,
Name NVARCHAR(255) null,
...
I have a class Item and a class ItemAttribute, where Item has a property of type ItemAttribute.
ItemAttribute only has two properties, a Guid called ID and a string called name. The idea here is that I want to store a table called ItemAttributes that contains a list of unique strings.
My question is, if I save an Item that references a...
Hi guys,
I have a little DB challenge for you. Hopefully you can help.
The Problem:
I need a solution that will allows me to "handle" changes to primary keys/ composite keys. By
"handle", I mean I should still be able to perform CRUD operations with little or no code changes. It needs to have minimum hassle from an application/ databa...
If one has a object which can persist itself across executions (whether to a DB using ORM, using something like Python's shelve module, etc), should validation of that object's attributes be placed within the class representing it, or outside?
Or, rather; should the persistent object be dumb and expect whatever is setting it's values t...
I am trying to get started working with NHibernate. I went to download the latest production release at https://www.hibernate.org/6.html. The NHibernate download says development beside it, whereas other downloads say Production.
Is this what I want?
...
Hiya:
I wonder if anybody has an idea on this...
I'm looking at securing a low level object in my model (a "member" object) so by default only certain information can be accessed from it.
Here's a possible approach (damn sexy if it would work!):
1) Add a property called "locked" - defaulting to "true" to the object itself.
It ap...
Hey all. Quick question on Fluent syntax. I had thought I had this down, but I'm getting a weird failure. Basically, I have a hierarchical kind of structure that I'm trying to persist, and it all seems to work, except when I do an actual integration test w/ the db.
I have a Node object which has a Parent property, which is another Nod...
i have to work with an existing database (not managed with doctrine) and i want to use doctrine only for new tables in this db.
is there a way to tell doctrine to not drop the entire db on reload but only the models defined in the yaml file ?
...
Hi,
Suppose a mapping like this one
@Entity
public class User {
private Integer id
private List<Info> infoList;
@Id
public getId() {
return this.id;
}
@OneToMany(cascade=CascadeType.ALL)
@JoinColumn(name="USER_ID", insertable=false, updateable=false, nullable=false)
public getInfoList() {...
I'm learning NHibernate to learn a more robust ORM than linq to sql, but i'm struggling with some simple things.
My first challenge is mapping this ID column using hbm.xml.
CREATE TABLE [dbo].[Party](
[Id] [int] IDENTITY(1,1) NOT NULL
CONSTRAINT [PK_Party] PRIMARY KEY CLUSTERED
(
[Id] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NOREC...
Hi,
My domain model is using System.Net.Uri to represent URLs, and System.Drawing.Color to represent colors. In the db, uris are simply nvarchars and colours are web (hex) rgb values.
Using NHibernate, is there some way to map between these values using some custom mapper?
I don't need to query against these items, but it would be nic...
I have an existing class that I'd like to persist as-is.
class Foo
{
public int Id;
...
}
I have the following ClassMap:
class FooMap : ClassMap<Foo>
{
Id(x => x.Id);
...
}
Building a session factory results in an invalid cast exception. My setup works if my entity class has the standard "public virtual int Id { get...
I'm new to NHibernate and FNH as well. I'm familiar with ORM's and decided to see what all the buzz was about with this particular one mostly because of the productivity gains. At this point I think my time would have been better spent using something else but I don't want to let this defeat me and I'm hoping it's a stupid error I'm ma...
Whenever I use the ORM deisgner in LinqToSql I have real problems trying to get the latest objects from the server explorer after i've updated them in the database.
For example, I have dragged in a stored procedure to handle my insert/updates, which creates the method for me to call. Problem is I then have to go and change one of the p...
Let say I'm doing a basic transaction system where I have the following objects.
public class User
{
public virtual int Id{get; set;}
}
public class Transaction
{
public virtual int Id{get; set;}
public virtual Item Item {get; set;}
public virtual User Seller{get; set;}
public virtual User Buyer{get; set;}
}
Notice how...
Hi
I need to map a class which has a list of Enums to a db table, using NHibernate
here are the objects
public class Driver : IIdentity
{
private IList<Licence> licences;
/// <summary>
/// The drivers licences
/// </summary>
public virtual IList<Licence> Licences
{
get
{
return this...
Hi,
I got an exception in Vici.CoolStorage 'Unable to cast object of type 'System.String' to type 'QueryExpression' when using the following filter on the .List() method of my Event class:
Event.List("has(Resource where has(Teams where TeamID = @TeamID))",
"@TeamID", teamID);
-> Event - Resource = ManyToOne relation ...
We are using Microsoft's sqljdbc driver 1.2 in combination with Hibernate under Windows. Occasionally we are getting an OutOfMemoryError from the JDBC driver although plenty of memory is still available in the JVM heap.
Here's a stack trace of the exception we are getting:
java.lang.OutOfMemoryError: unable to create new native thread
...
Hi,
I'm getting started with JPA and created the following (simplified) tables;
airport
--------
id (pk)
city
code
...
trip
--------
id (pk)
originAirport_id (fk)
destinationAirport_id (fk)
...
I'm trying to map this in JPA/Hibernate.
In My trip object I created 2 airport objects:
private Airport airportFrom;
private Airport ai...