from nhib/StatisticsImpl.
From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Fabio Maulo
Sent: den 9 september 2008 17:32
To: nhusers@googlegroups.com
Subject: [nhusers] Re: Pluggable IStatistics?
Statistics will have some performance info in NH2.1
2008/9/9 Roger Kratz
This is a very personal opinion but...
If I got you correctly you have a lot of sp:s with business logic and now you
want to put the business logic into queries using a nhib? My suggestion is -
don't do it. If you prefer seeing a db as a place for storing data _and_ a
place for business logic
from A a inner join a.B b where
or
CreateCriteria(typeof(A)).CreateAlias(B,b, JoinType.InnerJoin)
Why is b's data returned in the result set/part of the select clause (if fetch
or SetFetchMode isn't used)? I'm feel I'm missing something obvious here...
/Roger
Hi
From time to time when analyzing queries, much time are spent in
SNINAtiveMethodWrapper.SNIReadSync when NHybridDataReader is grabbing data out
of the datareader.
I would guess this is more of an ado.net question than nhib, but I'm sort of in
the dark here... I got the impression that I've
september 2008 05:55
To: nhusers@googlegroups.com
Subject: [nhusers] Re: SNIReadSync
This is the call that actually read from the DB.
SNI is the SQL protocol.
The reason that you see those numbers being high is that the DB is performing
more work
On Tue, Sep 23, 2008 at 2:36 AM, Roger Kratz [EMAIL
, 2008 at 11:53 AM, Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL
PROTECTED] wrote:
I'll be glad to, but how do you want the test (you do mean a unit test I
guess)? I rely on dotTrace on this one. Cannot assert it so to speak
From: nhusers@googlegroups.commailto:nhusers@googlegroups.com
A - BCollection
- CCollection
- DCollection
To avoid cartesian product when eagerly loading a graph of A:s, I split the
query into three different ones...
select a from A a left join fetch a.BCollection b where [X]
select a from A a left join fetch a.CCollection c where [X]
select a from A
Hi
I cannot use my own IResultTransformer when the result set only contains one
column. TransformTuple method expects an array of tuples, but will in this case
be called with a non array type. Is there any good work around (except adding a
dummy column)?
Session.CreateQuery(@select
You can open/close the connection using session.Disconnect()/Reconnect() which
is recommended if you hang on to the session for a while.
If you use long lived session I agree that it might feel better if the created
session was closed (disconnected).to start with. I guess the choosen path is
a transaction NH release the connection after transaction
complete.
If you open a session using your connection NH give you the responsibility to
do what you want with it.
2008/10/1 Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]
You can open/close the connection using session.Disconnect()/Reconnect
Are you sure ?
The default connection release mode is auto that mean AfterTransaction...
mmm I must improve the logging of connection manager to check it.
2008/10/1 Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]
Hmm... I must miss something or maybe I misunderstand your but... When I commit
Have a look at IInterceptor or event listeners (nh =2.0).
-Original Message-
From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: den 2 oktober 2008 02:18
To: nhusers
Subject: [nhusers] Design : NHibernate Data coupled with UI layer ??
Dear experts.
I have
@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Roger
Kratz
Sent: den 2 oktober 2008 00:11
To: nhusers@googlegroups.com
Subject: [nhusers] SV: [nhusers] Re: SV: [nhusers] Re: SV: [nhusers]
Understanding how NH handles database connections
I double checked it, asserting in some tests in the trunk
to verify it.
It working as expected... BTW the work for the weekend stay there because I
must check the aggressive-release-mode.
Why, in your opinion, set the connection to null is a problem ?
2008/10/3 Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]
Fabio,
Regarding this one about
Hi
When using union-subclass, the foreign-key naming in the base type does not
work. No crash, but the foreign key won't be named as stated. Is this by
design/known issue or should I JIRA this?
class name=Base
...
many-to-one name=Foo foreign-key=ThisNamingDoesNotMatter /
union-subclass
Just a few notes...
Force me to make all of my methods and properties virtual, for the
use of proxies
Let the proxies be created by deriving from an interface instead. class
proxy=yourInterface
public virtual string FName
{
get { return _fname; }
set
{
Look at cascade in the docs.
Från: nhusers@googlegroups.com [EMAIL PROTECTED] f#246;r ursuletzu [EMAIL
PROTECTED]
Skickat: den 9 oktober 2008 00:15
Till: nhusers
Ämne: [nhusers] TransientObjectException?
Hi, I am new to NHibernate and i encountered this
: den 9 oktober 2008 00:29
To: nhusers
Subject: [nhusers] Re: TransientObjectException?
Thanks, that was it. Unfortunately it has the default NONE... hm...
On Oct 9, 1:18 am, Roger Kratz [EMAIL PROTECTED] wrote:
Look at cascade in the docs.
Från: nhusers
9 oktober 2008 10:44
To: nhusers@googlegroups.com
Subject: [nhusers] Re: TransientObjectException?
Could you please provide an example why the model would become a mess?
On Thu, Oct 9, 2008 at 10:56 AM, Roger Kratz [EMAIL PROTECTED] wrote:
Making clear, distinct boundaries where your graph
Hi
Is this suppose to work?
Entity ent=[...];
Entity entClone =ent.DeepCloneOfAggregate();
...
session.Lock(ent, LockMode.None);
session.Merge(entClone); --has not been changed
Assert.IsFalse(session.IsDirty());
It works if ent does not have any collection. If it has, the session becomes
length=x works for me - if you mean you want SchemaExport to generate a
nvarchar(x) column for your string property.
Or do you mean that you want SchemaExport to generate a (n)char column?
-Original Message-
From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Papy
Don't know if I understand you but... ISession.Refresh(entity)?
-Original Message-
From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of antoschka
Sent: den 20 oktober 2008 16:34
To: nhusers
Subject: [nhusers] how to attach a detach entity with the persistent state
Hi,
: [nhusers] Re: how to attach a detach entity with the persistent state
2008/10/20 Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]
Don't know if I understand you but... ISession.Refresh(entity)?
mmm better session.Merge or any other action methods.
Refresh do the Refresh from DB.
--
Fabio Maulo
IFlushEventListener sniff if there is something dirty.
IFlushEntityEventListener find what is dirty.
I've learned what these interface do the hard way. IMHO - it would have saved
me quite some time if small comments like yours/better comments than now/ were
written as comments on the source
A
B
sess.loadA won't hit the database so nhib will create an A proxy instance for
you, making it possible to fill A (and B) with data later.
If you query for A objects (and no eager fetching is used), you will get A's
data back and therefore a real A instance can be created. However B will
then.
Is it possible for me to figure out in NH 1.2 if the proxied entity in that
property is loaded or not, without triggering it to load?
From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Roger
Kratz
Sent: Tuesday, October 28, 2008 9:55 AM
To: nhusers@googlegroups.com
Subject
A
Bcollection (all-delete-orphan)
When refreshing an A instance and one B object has been deleted in data source
from some other ISession, an exception is thrown (No row with the given
identifier exists).
Somewhere back in my head I think I've read that this is by design and not a
bug
these matter
2008/10/29 Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]
A
Bcollection (all-delete-orphan)
When refreshing an A instance and one B object has been deleted in data source
from some other ISession, an exception is thrown (No row with the given
identifier exists).
Somewhere
Hi
query name=myQuery
query-param name=a type=b /
The xsd schema for nh 2.0 offers query-param above. However - I cannot see
how it's used? Does not matter what I write in name or type - no crash, not
anything. Is it true, this tag is not used in nh 2.0? Or is it some setting
that needs
When I'm testing against a non inmemory db, I use SetupFixture to create the
schema and then have some base class for the testfixtures where you start a
transaction in the setup and do a rollback in teardown. There are some
drawbacks like the need of some hack if you need two ISessions in a
You can't let the db do the work for you?
http://www.hibernate.org/hib_docs/reference/en/html/mapping.html
5.1.21 - on-delete=cascade
-Original Message-
From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paladin_za
Sent: den 12 november 2008 06:34
To: nhusers
Subject:
single selects at a time) query the whole object graph for the
entity in question in one shot.
I'm just not sure how I would go about doing this...
On Nov 12, 10:53 am, Roger Kratz [EMAIL PROTECTED] wrote:
You can't let the db do the work for
you?http://www.hibernate.org/hib_docs/reference/en
I use something like...
IxxxRepository(IUnitOfWork)
...where an IUnitOfWork holds a nhib ISession
Then one IUnitOfWorkFactory object for each ISessionFactory that creates
IUnitOfWork instances.
A singleton object knows what IUnitOfWorkFactory to use based on which user it
is.
-Original
I got the impression that you recreate your IsessionFactory over and over again
for each request/every call to your data layer? Creating an ISessionFactory is
an expansive op. Create the instance in some start up code for your web app and
reuse it.
-Original Message-
From:
Creating your own IUserType for IPayment would do the trick I guess.
-Original Message-
From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jan
Limpens
Sent: den 20 november 2008 15:15
To: nhusers@googlegroups.com
Subject: [nhusers] difficult (?) mapping with components
Hi
When eagerly loading collections using ICriteria, I've noticed that some
columns sometimes are returned multiple times. I haven't had a closer look what
makes this happen though.
Before digging deeper into this (and creating a JIRA ticket), I just want to
check if this is by design (cannot
it is used as the FK reference of the association
On Mon, Nov 24, 2008 at 12:59 PM, Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL
PROTECTED] wrote:
Hi
When eagerly loading collections using ICriteria, I've noticed that some
columns sometimes are returned multiple times. I haven't had a closer look
reference of the association
On Mon, Nov 24, 2008 at 12:59 PM, Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL
PROTECTED] wrote:
Hi
When eagerly loading collections using ICriteria, I've noticed that some
columns sometimes are returned multiple times. I haven't had a closer look what
makes
is that NH has no guaratees that they will be the same column.
On Mon, Nov 24, 2008 at 3:06 PM, Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL
PROTECTED] wrote:
FYI
There are other situation where data is sent over the wire as multiple,
identical columns...
* Bidirectional refs will have two
columns in result set
The problem is that trying to do this logic is complex and unfriendly.
The cost for the user is an extra column that is being sent, but that is not
going to cost any additional I/O.
On Mon, Nov 24, 2008 at 9:45 PM, Roger Kratz [EMAIL PROTECTED]mailto:[EMAIL
PROTECTED] wrote
Can't you just explicitly load the clients in a separate query when you need
these and let nh glue them/init the proxies to the graph? Either by using the
same uow/ISession or reattach the the owners and the run this query?
-Original Message-
From: nhusers@googlegroups.com
When I test db queries, I want to involve a data source. I want to test that
the query returns correct data - that's what I want to test.
What would 1 below give you (more than code coverage)? I defiantly would say
2.
-Original Message-
From: nhusers@googlegroups.com
Hi
There seems to be some problem with the following hql query...
[
from Foo f
where f.Aaa=:aaa
and exists(from Bar b where [...])
]
...if filter(s) are declared for Bar. The parameters (=resulting @p0, @p1) are
messed up. One parameter gets another's parameter value.
(Eg, it seems that @p0
What version are you using? If I remember correctly, a lot of these handled
exceptions disappeared in 2.0.1.
/Roger
Från: nhusers@googlegroups.com [nhus...@googlegroups.com] f#246;r antoschka
[hueb...@gmail.com]
Skickat: den 11 januari 2009 14:46
Till:
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
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]
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 worry about
it).
On Thu, Jan 15, 2009 at 4:36 PM, Roger Kratz
roger.kr
The Isession is a 1st level cache. When the query is rerun, nh will reuse the
instances it already holds.
ISession is both a unitofwork and identity map
http://martinfowler.com/eaaCatalog/unitOfWork.html
http://martinfowler.com/eaaCatalog/identityMap.html
Also, I would, in normal cases,
IIRC you can set access to readonly in trunk version.
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
ilmatte
Sent: den 2 februari 2009 16:12
To: nhusers
Subject: [nhusers] Nhibernate agnostic about some columns
Hello,
I would like to
I'm led to believe that this is because NHibernate wants to do an insert
with EmployeeId
as NULL and then update it to the ID of the parent, and I have a non-null
constraint on employeeID.
Yes.
Or am I going to have to put the Employee reference in employee status?
Yes. Use a bidirectional
No mapping problem.
There are different solutions to this, one is to add
.SetResultTransformer(CriteriaUtil.DistinctRootEntity)
to your query
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
James L
Sent: den 13 februari 2009 11:13
To:
If I understand you correctly you want optimistic version control on aggregates
rather than entities/dbrows?
It depends... In the app I'm working with right now we're always have
bidirectional refs within an aggregates which make it quite easy/fast to find
the aggregate root at persist time
READ. This with minimal intrusion
into the Domain Model?
Thanks in advance for all the help.
On Feb 17, 3:01 pm, Roger Kratz roger.kr...@teleopti.com wrote:
If I understand you correctly you want optimistic version control on
aggregates rather than entities/dbrows?
It depends
business rules (say a store does not allow orders above a certain
value like some others). The objB would be for instance the Store.
Cheers,
Nuno
On Feb 17, 8:44 pm, Roger Kratz roger.kr...@teleopti.com wrote:
Thank you for your post Katz. I understand what you are saying but
wouldn't
so just to clarify, if I did a Load by key, the 1st level cache will be
checked, otherwise it won't?
FYI
ISession is also an identity map
(http://martinfowler.com/eaaCatalog/identityMap.html), ensuring no duplicate
instances exists in one ISession/uow. This check of the state in ISession
I was wondering the same question a while ago.
IIRC, the reason why an exception isn't thrown in this case is nh's ability for
polymorphistic queries. In your case, it does not have to be a Cat you get back
but a DomesticCat or whatever.
In other words - just because your prop doesn't exist in
myPerson.AddCar(myCar)
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
graphicsxp
Sent: den 9 mars 2009 16:52
To: nhusers
Subject: [nhusers] issue with bi-directional one-to-many association when saving
Hello,
I have a question about
Hi
The new (NH-1657) TimeSpan type gives wrong result if timespan value is more
than 24 hours or negative (I'm using sql2005 dialect, not mention any type in
mapping file - datetime in db).
Am I suppose to use TimeSpanInt64 to get this to work or is it a bug? Should I
JIRA this?
IMHO - If
the Db.Type: time.
Then you will able to persist times between: 00:00:00.00 to
23:59:59.999.
On Wed, Mar 25, 2009 at 10:54 AM, Roger Kratz
roger.kr...@teleopti.commailto:roger.kr...@teleopti.com wrote:
Done
http://nhjira.koah.net/browse/NH-1715
From: nhusers@googlegroups.commailto:nhusers
...@googlegroups.com] On Behalf Of
Dario Quintana
Sent: den 25 mars 2009 17:14
To: nhusers@googlegroups.com
Subject: [nhusers] Re: TimeSpan 24h or 0h
Roger, hi
On Wed, Mar 25, 2009 at 1:03 PM, Roger Kratz
roger.kr...@teleopti.commailto:roger.kr...@teleopti.com wrote:
IMHO - even with timespan between 0 and 24h
...@googlegroups.com] On Behalf Of
Dario Quintana
Sent: den 25 mars 2009 17:32
To: nhusers@googlegroups.com
Subject: [nhusers] Re: TimeSpan 24h or 0h
Yes, the problem is with Sql 2005.
Would be nice to see a patch for this dialect.
On Wed, Mar 25, 2009 at 1:20 PM, Roger Kratz
roger.kr
be nice to see a patch for this dialect.
On Wed, Mar 25, 2009 at 1:20 PM, Roger Kratz
roger.kr...@teleopti.commailto:roger.kr...@teleopti.com wrote:
Im using sql2005 dialect. (no explicit type in mapping file - datetime column)
Whatever I persist...
Assert.AreEqual(orgObj.MyTimeSpan
if you like?
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Dario Quintana
Sent: den 25 mars 2009 17:14
To: nhusers@googlegroups.com
Subject: [nhusers] Re: TimeSpan 24h or 0h
Roger, hi
On Wed, Mar 25, 2009 at 1:03 PM, Roger Kratz
roger.kr
Either by using three different selects,
[get type3 where xxx]
[get type2 where xxx]
[get type1 where xxx]
...preferable batching these queries using MultiCriteria/Query
...or...
Getting a wider set back, using joins.
SetFetchMode(Reference, FetchMode.Join), Criteria
join fetch, HQL
/Roger
Hi
Let's say I have
property name=MappedX type=MyUserTypeForX
[...]
In my case every time a type X is mapped, I want my
IUserType/ICompositeUserType MyUserTypeForX to be used. Can I somewhere tell NH
this instead of explicitly repeat this in the mapping files?
Of course this is no big deal,
april 2009 15:50
To: nhusers@googlegroups.com
Subject: [nhusers] Re: Default IUserType/ICompositeUserType for certain type
typedef is for short.
We can implement something more to use typedef even when you don't specify
the type in a property.
2009/4/2 Roger Kratz roger.kr
/ICompositeUserType for certain type
here i describe how to use typedef:
http://gustavoringel.blogspot.com/2009/02/encrypting-password-or-other-strings-in.html
On Thu, Apr 2, 2009 at 1:28 PM, Roger Kratz
roger.kr...@teleopti.commailto:roger.kr...@teleopti.com wrote:
Hi
Let's say I have
property name
Subject: [nhusers] Re: Default IUserType/ICompositeUserType for certain type
here i describe how to use typedef:
http://gustavoringel.blogspot.com/2009/02/encrypting-password-or-other-strings-in.html
On Thu, Apr 2, 2009 at 1:28 PM, Roger Kratz
roger.kr...@teleopti.commailto:roger.kr
*blush*
I just realized that, yes.
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Fabio Maulo
Sent: den 2 april 2009 16:03
To: nhusers@googlegroups.com
Subject: [nhusers] Re: Default IUserType/ICompositeUserType for certain type
2009/4/2 Roger Kratz roger.kr
ticked about include typedef, in the heuristic
process, when the 'type' is not defined for a property.
2009/4/2 Fabio Maulo fabioma...@gmail.commailto:fabioma...@gmail.com
2009/4/2 Roger Kratz roger.kr...@teleopti.commailto:roger.kr...@teleopti.com
Maybe it does help yes. Just reusing the old
http://www.dil.univ-mrs.fr/~massat/docs/hibernate-3.1/api/org/hibernate/Session.html#merge(java.lang.Object)
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
graphicsxp
Sent: den 3 april 2009 16:09
To: nhusers
Subject: [nhusers] Re: how
-
delete-orphan)
Can you help with this ?
On 3 avr, 15:12, Roger Kratz roger.kr...@teleopti.com wrote:
http://www.dil.univ-mrs.fr/~massat/docs/hibernate-3.1/api/org/hiberna
..
.)
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com
Nhibernate is an o(bject)/r mapper. Hql is a query language where you query for
objects not db tables (nor db columns).
I suggest you to read the manual to give you a good understanding of what nh
is. You can find it here
http://nhforge.org/doc/nh/en/index.html
Depending of what you're trying
As far as I know, NH has no built in support for coarse grained locks
(http://www.martinfowler.com/eaaCatalog/coarseGrainedLock.html).
I guess there are different ways to solve this but we solved it using an
interceptor.
Inside our aggregates every ref is bidirectional (we need it for other
StatelessSession doesn't do cascade operations, AFAIK.
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
mscheibler
Sent: den 29 april 2009 07:57
To: nhusers
Subject: [nhusers] Re: IStatelessSession.Insert and uni-directional one-to-many
thinking about extending the interface
with something like IStatelessSession.InsertMany(object entity, string
manyProperty). Do you think something like that would word? If yes,
would you consider including into the trunk?
Michael
On 29 Apr., 09:40, Roger Kratz roger.kr...@teleopti.com wrote
Hi
Short version...
Why not allowing Equals/GetHashcode calls without initializing proxy when the
impl of these methods only use id on their entity data?
Longer version...
In some use cases we've got plenty of Equals calls. The entities I call equals
on, isn't really needed for the use case
Hi
Having a MultiCritiera (and MultiQuery I guess) with queries with different
enabled filters doesn't seem to work as expected. Is this something that should
work? If not (I fully respect if this is a no-no due to the fact that filters
belong to a session and not a db query), would it be
Have a bidirectional ref and mark the collection with inverse=true.
Från: nhusers@googlegroups.com [nhus...@googlegroups.com] f#246;r Krzysztof
Koźmic [krzysztof.koz...@gmail.com]
Skickat: den 11 maj 2009 21:52
Till: nhusers@googlegroups.com
Ämne:
@googlegroups.com
Ämne: Re: SV: [nhusers] Superfluous update?
I *don't* want to have bidirectional ref. I want my model just like it
is now.
And still, it's besides the point which is - why is NHibernate doing two
rountrips to the DB for something it could (or could it?) do in one.
Krzysztof
Roger
be reasonable to put a not-null=true on
the association.
Krzysztof
Fabio Maulo pisze:
2009/5/11 Roger Kratz
roger.kr...@teleopti.commailto:roger.kr...@teleopti.com
http://www.cs.bham.ac.uk/~aps/syllabi/2004_2005/issws/h03/hibernate.html#one_to_many_unidirhttp://www.cs.bham.ac.uk/%7Eaps/syllabi
How is this suppose to work on transient entities if you have a PI domain model?
But no, nh doesn't do this for you. Not even on persistent entities.
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
dnagir
Sent: den 13 maj 2009 11:50
, 1:38 am, Roger Kratz roger.kr...@teleopti.com wrote:
How is this suppose to work on transient entities if you have a PI domain
model?
But no, nh doesn't do this for you. Not even on persistent entities.
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus
delete one child from my parent by calling remove
on the childs list
cascade=all_delete_orphan
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Niclas Pehrsson
Sent: den 14 maj 2009 11:08
To: nhusers
Subject: [nhusers] Parent Child
but
I get this execption: NHibernate.MappingException: Unsupported cascade
style: all_delete_orphan
Im running NHibernate 2.1alpha
On May 14, 11:18 am, Roger Kratz roger.kr...@teleopti.com wrote:
delete one child from my parent by calling remove
on the childs list
cascade=all_delete_orphan
: Bidirectional association - bidirectionally settable
Why? I want consumer to be able to modify the collection.
On May 14, 5:45 pm, Roger Kratz roger.kr...@teleopti.com wrote:
So it is pretty easy to make a mistake (not very common but still):
Don't offer an IList/ICollection but an IEnumerable
, 9:58 pm, Roger Kratz roger.kr...@teleopti.com wrote:
On Blog, have a method that sets both directions
void AddPost(IPost post)
_posts.Add(post);
post.Parent(this);
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
dnagir
Sent
Criteria
* Nicer api if you want to build the query at runtime.
* Can query non mapped types
HQL
* Can be pre parsed
* Easier (?) syntax for dba:s
* Collection stuff (elements, all, minIndex, maxIndex etc) are better supported
in HQL afaik
(Certainly there are more diffs, but these were the
you can not make cartesian products with criteria.
?
aCartesianProduct = s.CreateCriteria(typeof(Foo))
.SetFetchMode(ACollection, FetchMode.Join)
.SetFetchMode(BCollection, FetchMode.Join)
.SetFetchMode(CCollection, FetchMode.Join)
.SetFetchMode(DCollection, FetchMode.Join)
.ListFoo();
joins from Foo to everywhere.
all with an ON clause on the join.
SELECT ...
FROM Table1, Table2-- (no join)
-- (no rel restricting WHERE)
this can be done in HQL, and afaik not in Criteria
On Tue, May 19, 2009 at 2:48 PM, Roger Kratz
roger.kr
If your real world case is more complex than your example (?), I would consider
impl state pattern rather than your enum.
giving the object an initialization state
IIRC - I've seen some example at nhforge how to use a parameterized ctor, but
if you want to keep your design, it's seems a lot
I don't know what you're trying to accomplish but...
Each isession is an identity map. If you read an entity in another session, you
will have two different instances.
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Fred F.
Sent: den
You should read/google/learn more about how nh is using proxies.
http://nhforge.org/doc/nh/en/index.html#performance-fetching-initialization
Also, try read/google/learn more about session management in asp.net scenarios.
NHibernate Burrow has some typical implementations about this and can be a
There were some issues with decimal db type
http://nhjira.koah.net/browse/NH-1594
Are you using latest nh bits?
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Stefan Steinegger
Sent: den 1 juli 2009 13:54
To: nhusers
Subject: [nhusers]
It's used by SchemaExport. It may also be used by you (or other fw) if you need
this info for your own purposes.
AFAIK, nh does not use this info for any validation/truncation at all. How
should this be done in some general way? Truncated? Throw ex? Trim the string?
etc etc
/Roger
nhibernateutil.isinitialized(entityOrCollectionProxy)
Från: nhusers@googlegroups.com [nhus...@googlegroups.com] f#246;r mantzas
[smantzia...@gmail.com]
Skickat: den 15 juli 2009 13:27
Till: nhusers
Ämne: [nhusers] Properties and Proxies
Hi,
i am
I've had the same problem wint nant + xpzip some time ago in our app.
Maybe this is the problem?
http://stackoverflow.com/questions/522421/how-can-i-get-output-of-nant-zip-task-to-be-unzipped-on-xp
(not my post but describes the issue I had some time ago)
Från:
Use interfaces in your model
Eg
IUser
ICompany Company {get; set;}
-Original Message-
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of
Nick Clarke
Sent: den 18 augusti 2009 12:13
To: nhusers
Subject: [nhusers] NHibernate 2.1 Dependency Injection and/or
Hi
AFAIK session's timestamp isn't ever changed. Why isn't it updated when it
commits a transaction? That would potentially give more cache hits if its life
time spans more than one transaction. It's not a big deal at all, I'm more
curious _why_ - it's obviously something that I miss. In what
1 - 100 of 280 matches
Mail list logo