Hello, I've been reading for a while about temporal database and the
main thing I understood was: it's hard.
I would like to present the way I think of implementing temporal
database (or version database) and I'll be happy to hear what you
think or how you will go about it.
Let's start with the
I have a one-to-many association from Project to
ProjectSampleRelationship.
ProjectSampleRelatiosnhip is conceptually a ValueObject though in NH
it is a entity.
Therefore, I want to DELETE and INSERT any updates to a
ProjectSampleRelationship in the set/ of SampleRelationships.
The unique
I think that using a TransactionScope object to wrap all your method calls
should work in this case.
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf
Of Stuart Campbell
Sent: quinta-feira, 15 de Janeiro de 2009 10:29
To: nhusers@googlegroups.com
Subject: [nhusers]
Hibernate version:
Nhibernate 2.1.0.1001
Mapping documents:
property name=hairColorCollectie
type=HiDating.BusinessLayer.Mapping.EnumMappingHelper`1
[[HiDating.BusinessLayer.HairColor, HiDating.BusinessLayer]],
HiDating.BusinessLayer access=field
column=PersonProfile_HairColorID /
Code between
Remove the type=[...] in the mapping.
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Adeel
Sent: den 15 januari 2009 14:56
To: nhusers
Subject: [nhusers] IsDirty() is true when retrieving objects
Hibernate version:
Nhibernate
Ah, sorry - didn't see you had your own IUSertype. Forget my mail.
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Adeel
Sent: den 15 januari 2009 14:56
To: nhusers
Subject: [nhusers] IsDirty() is true when retrieving objects
Hibernate
Forgotten...
On 15 jan, 14:59, Roger Kratz roger.kr...@teleopti.com wrote:
Ah, sorry - didn't see you had your own IUSertype. Forget my mail.
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Adeel
Sent: den 15 januari 2009 14:56
To:
I checked Equals, and there was a error in there indeed.
I changed it and now it is working!!!
Thanks a million.
On Jan 15, 3:18 pm, Roger Kratz roger.kr...@teleopti.com wrote:
I would verify that IuserType.Equals(object, object) is correctly impl. Set a
break point there when you flush your
To be honest I'm *not* actually sure. I will check that. Thanks Luis.
Will also look into Castle Automatic Transaction facility.
On Thu, Jan 15, 2009 at 2:31 PM, Luis Abreu lab...@gmail.com wrote:
The thing is, I don't really want to have a dependency on MSDTC, which I
believe would be the
Check Fabios blog at http://fabiomaulo.blogspot.com
Tuna Toksöz
http://tunatoksoz.com
Typos included to enhance the readers attention!
On Thu, Jan 15, 2009 at 12:28 PM, Stuart Campbell
stuart.campbe...@gmail.com wrote:
What's the recommended way to support nested transactions in NH?
Hello,
I have a question, it's not, I think, 100%Nibernate
I'm doing a project, first one, completely in NHibernate. I have some
method, these methods return an IList. That's find.
But now, I'd like to bind this IList with some controls like :
DataGridView, BindingNavigator,TextBox and
If you are using Rhino-Tools - or would consider using it - there is a lot
of work in there for the UnitOfWork pattern. Specifically review the
LongConversationManager.cs and the UnitOfWork.cs files. These allow you to
have multiple concurrent conversations going for the same user, which can be
Hello
I've got to map an object with a lot of properties that really are
better located into a Map.
This can be implemented using the dynamic-component.
Now my second requirement is that not only I don't know what are the
elements that need going into the map at buildtime I don't know either
at
Has anyone run into an issue in NH 2.0.1 GA? I've upgraded recently
from 1.2, and have noticed that is the ISessionManager.Refresh() is
called for an object already loaded in the session, that a cascade
forces loading of all child objects, even if the map specifies that
they are lazy. The first
Hello everybody,
this is my first post in this group and I wonder if anybody has
experienced this same problem.
I'm working on a NHibernate-based project and I wanted to play a
little with Linq to NHibernate, from NHibernate Contrib.
So I happily integrated it in my system and turned some
in winforms new BindingListT(IListT) will create a boundable list. Same
thing for ASP.NET as far as i remember but i work mostly winforms.
Gustavo.
On Thu, Jan 15, 2009 at 6:47 PM, Kris-I kris.i@gmail.com wrote:
Hello,
I have a question, it's not, I think, 100%Nibernate
I'm doing
Please post the relevant SQL in both cases.
On Thu, Jan 15, 2009 at 12:39 PM, Gabriele Tassi
gabriele.ta...@gmail.comwrote:
Hello everybody,
this is my first post in this group and I wonder if anybody has
experienced this same problem.
I'm working on a NHibernate-based project and I
Ouch!
I fear that I already removed all the Linq to NHibernate stuff, so I
cannot provide you the exact query...
Anyway, here's more less what I got:
First case (Hql)
select USER.FIRST_NAME,
USER.LAST_NAME,
...
USER.ID
from USER
where USER.SITE_FK = :SiteId
Second case
You don't have to create a BindingListT for asp.net. asp.net is happy to
work with IListT
On Thu, Jan 15, 2009 at 1:01 PM, Gustavo Ringel gustavo.rin...@gmail.comwrote:
in winforms new BindingListT(IListT) will create a boundable list. Same
thing for ASP.NET as far as i remember but i work
Hi, you can check here:
http://www.codeproject.com/KB/WPF/WPF_NHibernate_Validator.aspx
My WPF sample app using NHibernate. I make use of BindingListT(IListT)
2009/1/15, Gustavo Ringel gustavo.rin...@gmail.com:
in winforms new BindingListT(IListT) will create a boundable list. Same
thing for
The contrib linq is not optimized, so that is not surprising.Try to use
Criteria directly for that, and we can inspect the results better
On Thu, Jan 15, 2009 at 1:40 PM, Gabriele Tassi gabriele.ta...@gmail.comwrote:
Ouch!
I fear that I already removed all the Linq to NHibernate stuff, so I
Are you testing business logic that is using your repository, or are you
testing the repository itself?
On Thu, Jan 15, 2009 at 1:23 PM, Troy T. troyltut...@gmail.com wrote:
Hi,
I'm using Linq to NH in a project, and would like to test my
repository code without hitting the database. I have
Both actually. I specifically want to test querying logic like this:
public Customer FindByCustomerNumber(string customerNumber)
{
return _repository.FindByCustomer(b = b.CustomerNumber ==
customerNumber);
}
Which calls
public T FindByT(ExpressionFuncT, bool where)
{
return
In my experience, i found it useful to simply write integration-tests
to test the repositories.
I generally avoid mocking 3rd party type such as ISession since the
interaction tests will most like be quite fragile
On Jan 15, 1:22 pm, John Teague jctea...@gmail.com wrote:
Are you testing
That's what we are currently doing now, but as the domain model grows, the
integration tests can get huge when testing queries with multiple criteria
(like a search screen). I'm finding most of the work is in getting the
database in the correct state for these kinds of respository/integration
NHibernate.Linq is a Linq provider for NHibernate 2.0.1 GA. It processes
Linq expressions using NHibernate's Criteria API. This release is meant as
a stopgap release pending an implementation not reliant on the Criteria
API. Most queries are supported with the exception of the following:
-
It's a lot easier to create an in-memory list of customers to query against
than setup records in the db.
Why? Maybe I'm missing something but...
inMemList.Add() vs repository.Add() is pretty similar?
Från: nhusers@googlegroups.com [nhus...@googlegroups.com]
My 2 cents if that counts :)
Personally I have gone down this route before with testing
repositories, but in the end found that mocking session calls just
becomes WAY too hard. I guess you ask yourself what value do you get
from mocking your queries against the session?
IMO this is very little
did you try out nDBUnit to get the db in a good state for tests ?
On Jan 15, 2:29 pm, Troy Tuttle troyltut...@gmail.com wrote:
That's what we are currently doing now, but as the domain model grows, the
integration tests can get huge when testing queries with multiple criteria
(like a search
Hi Chad,
do you know if its possible to get this to work with the NH trunk? or
is it impossible? I tried compiling a version against it last week
but I had a lot of bother getting things to work. Is there any strict
technical reason why it shouldn't work?
thanks,
Kev
On Jan 15, 9:53 pm,
Yes, by itself it is very similar. But when we get to a full suite of
integration tests, I have to manage cleanup so the db is in a good state
before the next test runs. But an in-memory collection will be cleaned up
for me automatically by the garbage collector (or at least I don't have to
How is this testing your queries though? How is an in memory
collection going to mimic your relational DB and validate your mapping
files are correct? Cascades work etc etc.
I still think NDBUnit is the way to go when testing your repository layer.
Cheers
Stefan
On Fri, Jan 16, 2009 at 10:31
In session per request pattern, session is flushed and transaction
committed at the end of the request? How do I handle unique or check
constraint violations during the request? In my old applications, I
would simply catch constraint violation exceptions and then show
appropriate error message
33 matches
Mail list logo