web application
2010/8/17 Craig van Nieuwkerk crai...@gmail.com
It is Windows or Web application?
On Tue, Aug 17, 2010 at 3:56 PM, osman nuri katib
osmannurika...@gmail.com wrote:
Hello everybody,
in my project, there are many mapping files(hbm.xml). And while
application
was
Is it a big issue then? Your application should only start infrequently.
You could try this
http://nhforge.org/blogs/nhibernate/archive/2009/03/13/an-improvement-on-sessionfactory-initialization.aspx
2010/8/17 osman nuri katib osmannurika...@gmail.com:
web application
2010/8/17 Craig van
Shitloads of solutions, one is to serialize the configuration and use that on
later runs instead of loading from mapping files. The problem with loading from
mapping files is that xsd-validation is slow. Search some and you will find
tonnes of information about this.
Med vänliga hälsningar,
İs sessionFactory running one time whole application life..Or while every
client is connecting the server?
17 Ağustos 2010 09:05 tarihinde Craig van Nieuwkerk crai...@gmail.comyazdı:
Is it a big issue then? Your application should only start infrequently.
You could try this
session factory should be built only once per application lifetime.
2010/8/17 osman nuri katib osmannurika...@gmail.com
İs sessionFactory running one time whole application life..Or while every
client is connecting the server?
17 Ağustos 2010 09:05 tarihinde Craig van Nieuwkerk
thank you very much. Serialization is solved my problem
[Serialization]
public class NhibernateHelper()
{
.
}
17 Ağustos 2010 09:14 tarihinde Jason Dentler jasondent...@gmail.comyazdı:
session factory should be built only once per application lifetime.
2010/8/17 osman nuri katib
No they are not the same, but that isn't the point. When you do a new
DateTime() it defaults to: 01/01/0001 12:00:00 AM
But 01/01/0001 was NOT sent to the database. Instead NULL was sent.
That is a problem.
(Speculation) Sounds like a check is done somewhere inside NH to
prevent
Ah, wouldn't it be great if you could simply define the entity and say to
some machine to generate class and mappings for you, using proven templates?
Oh look, that's the topic of this thread! ;)
FB
I read your line, is exactly like mine, with a different syntax. And I get
the same
On Mon, Aug 16, 2010 at 15:49, Frans Bouma fr...@sd.nl wrote:
I never said tests are magic, only that they DO provide a way to
catch
bugs,
because that's what they are for, as opposed to using FNH which,
as
a
mapping tool, is no better than XML, and doesn't have
Since there seems to be some confusion, this is the main test I was
referring to:
[Fact]
public void ConfigurationIsValid()
{
//call the method that creates the configuration and builds the
session
factory }
useless. Even if this test succeeds, you have no idea if your xml is
any
http://nhforge.org/doc/nh/en/index.html#mapping-types-anymapping
that would require him giving up FK constraints for referential
integrity. IMHO something you'd never want to.
FB
On Sun, Aug 15, 2010 at 4:17 PM, Muhammad Shehabeddeen
Hello,
I'm getting an error(update and insert)
like this:
NHiberante Error Invalid index N for this SqlParameterCollection with Count
N
I know cause of the problem:
this get error:
property name=FirstName column=FirstName type=string not-null=true
/
property name=LastName column=FirstName
This is normal (though often confusing) behaviour of NHibernate when
using a query which contains a Join. You basically get as many items
back when you would for a SQL result. I created a wrapper function
around the list to only return met the unique items. So that when I
call Customer Join
Thank you but there is no problem in select statements..Update and Insert is
problem.
How can I figured out?
2010/8/17 Dwarrel theo.de@gmail.com
This is normal (though often confusing) behaviour of NHibernate when
using a query which contains a Join. You basically get as many items
back
Yes, you would not want to use it for that reason, flush will do that
automatically. Unfortunately I do sometimes crave for a way to see
which objects are in the session. Sometimes I would want to evict all
objects of a certain type from the session cache. This if you have a
longer running session
If you're optimising at the query text level, I think you've got
bigger issues (either architecturally to justify it, or
environmentally to suggest it).
On Aug 16, 11:06 pm, Diego Mijelshon di...@mijelshon.com.ar wrote:
No, it's not possible, but I'd love to see the math showing where you can
Hi, I have some questions...
For auditing, is it best to implement: IPreUpdateEventListener
andIPreInsertEventListener or EmptyInterceptor?
To avoid soft deletes ayende is using IPreUpdateEventListener, can I
do it in EmptyInterceptor instead?
thanks
--
You received this message because you are
SQL Server will shit itself if you try to use dates before 1753.
On Aug 17, 5:30 am, MattO xant...@gmail.com wrote:
Fabio,
No they are not the same, but that isn't the point. When you do a new
DateTime() it defaults to: 01/01/0001 12:00:00 AM
But 01/01/0001 was NOT sent to the database.
You can't map two properties to the same database column like that. Please
explain exactly what you are trying to achieve?
On Tue, Aug 17, 2010 at 2:12 AM, osman nuri katib
osmannurika...@gmail.comwrote:
Hello,
I'm getting an error(update and insert)
like this:
NHiberante Error Invalid
Can we see your mappings? then we may be able to help
John Davidosn
On Tue, Aug 17, 2010 at 6:56 AM, osman nuri katib
osmannurika...@gmail.comwrote:
table BRANCH has:
COUNTRY_LOCATION_ID,CITY_LOCATION_ID,TOWN_LOCATION_ID
and LOCATION table has
ID
NAME
while updating and
Use ISqlQuery.
John Davidson
On Tue, Aug 17, 2010 at 7:23 AM, osman nuri katib
osmannurika...@gmail.comwrote:
I want to update a column in a table..(all rows)
and I dont want to select them..
How can I do this (no HQL)
--
You received this message because you are subscribed to the
That kind of bulk operations are only supported for HQL.
You can do it with hql or sql.
2010/8/17 osman nuri katib osmannurika...@gmail.com
I want to update a column in a table..(all rows)
and I dont want to select them..
How can I do this (no HQL)
--
You received this message because
Frans,
On Tue, Aug 17, 2010 at 03:58, Frans Bouma fr...@sd.nl wrote:
OK, let me explain what I mean by the mappings are OK:
- They are considered valid by NHibernate (this is a single test)
You and I know that that's just not going to be a valid test. You
can have xml mappings
Won't you otherwise (I kind of lack a topic to contact him about...)?
On Tue, Aug 17, 2010 at 12:27 AM, Fabio Maulo fabioma...@gmail.com wrote:
Try to talk to LinFu implementor and I'l say you the story of the
LinFu.DynamicProxy used in NH.
On Mon, Aug 16, 2010 at 11:52 PM, Jan Limpens
On Tue, Aug 17, 2010 at 04:02, Frans Bouma fr...@sd.nl wrote:
Since there seems to be some confusion, this is the main test I was
referring to:
[Fact]
public void ConfigurationIsValid()
{
//call the method that creates the configuration and builds the
session
factory }
From what I know, recommended way is using event listeners. They are giving
you all required details. Not sure about interceptors...
Also, do a search in google, there was few audit samples published, you'll
have a starting point.
On Tue, Aug 17, 2010 at 10:57 AM, Luka cluk...@gmail.com wrote:
On Tue, Aug 17, 2010 at 09:27, Frans Bouma fr...@sd.nl wrote:
On Tue, Aug 17, 2010 at 04:02, Frans Bouma fr...@sd.nl wrote:
Since there seems to be some confusion, this is the main test I
was
referring to:
[Fact]
public void ConfigurationIsValid()
session.CreateQuery(update ..).ExecuteUpdates();
On Tue, Aug 17, 2010 at 8:23 AM, osman nuri katib
osmannurika...@gmail.comwrote:
I want to update a column in a table..(all rows)
and I dont want to select them..
How can I do this (no HQL)
--
You received this message because you are
ICriteria criteria = session.CreateCriteriaCorporation()
.Add(Expression.Or(Expression.Like(ShortName,
shortNameFilter, MatchMode.Anywhere), Restrictions.Equals(shortNameFilter,
)))
.Add(Expression.Or(Expression.Like(Title, titleFilter,
If the DateTime value is not actually NULL why interpret 01/01/0001 as
a NULL? I'm not understanding this correctly...
I'm very new to nHibernate, I'm not sure how to fix this issue when
you say inherit from our DateType. Can you tell me which files I
should be looking at in NH3 to back port
On Mon, Aug 16, 2010 at 9:28 PM, Diego Mijelshon di...@mijelshon.com.ar wrote:
While you _can_ use join-fetching to get everything at once, the most
efficient approach in theses cases is usually setting batch-size on the
classes and collections to a reasonable value.
Of course, the definition
How should I implement the mapping??? I am all at sea...
On 17 aug, 06:02, Fabio Maulo fabioma...@gmail.com wrote:
properties not supported (btw it is only a way to group some properties)
On Mon, Aug 16, 2010 at 4:58 AM, Adeel adeelsiddi...@gmail.com wrote:
I can't get it to work.
I have
a relation mapped with 2 properties mean a class representing the relation.
On Tue, Aug 17, 2010 at 10:20 AM, Adeel adeelsiddi...@gmail.com wrote:
How should I implement the mapping??? I am all at sea...
On 17 aug, 06:02, Fabio Maulo fabioma...@gmail.com wrote:
properties not supported (btw
The file is : DateType.cs
On Tue, Aug 17, 2010 at 10:12 AM, MattO xant...@gmail.com wrote:
If the DateTime value is not actually NULL why interpret 01/01/0001 as
a NULL? I'm not understanding this correctly...
I'm very new to nHibernate, I'm not sure how to fix this issue when
you say
On Tue, Aug 17, 2010 at 09:27, Frans Bouma fr...@sd.nl wrote:
On Tue, Aug 17, 2010 at 04:02, Frans Bouma fr...@sd.nl wrote:
Since there seems to be some confusion, this is the main
test I was
referring to:
[Fact]
On Tue, Aug 17, 2010 at 09:22, Frans Bouma fr...@sd.nl wrote:
From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com]
On
Behalf
On Tue, Aug 17, 2010 at 03:58, Frans Bouma fr...@sd.nl wrote:
2) it's doing work that's unnecessary, as you're
Awesome thanks so much! This fixed it.
To give anyone else who is reading this a bit more help this is what I
did:
1. I took the sources from NH 3.0, specifically DateType.cs and
imported it into my NH 2.1.2 project and I called it DB2DataType. I
examined the difference between this file and
On Tue, Aug 17, 2010 at 10:40, Frans Bouma fr...@sd.nl wrote:
gee, then why did I got crashing queries when I ran them,
but
the
xml was valid? some magical ball hovering over my office, which
influenced
the queries at runtime?
When did I claim otherwise?
thanks for the ansver
On Aug 17, 2:12 pm, Valeriu Caraulean caraul...@gmail.com wrote:
From what I know, recommended way is using event listeners. They are giving
you all required details. Not sure about interceptors...
Also, do a search in google, there was few audit samples published, you'll
Guys, I don't want to be rude, but don't you think that this neverending
discussion would be better if private ?
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To post to this group, send email to nhus...@googlegroups.com.
To unsubscribe from this
Although you're working with a 'legacy' database (whatever that means),
isn't it better to define a default constraint on the field? When you use
'magic' values for null values (which you do) it's key to have default
constraints for NULLable fields. This way, you can define the magic values
in 1
On Tue, Aug 17, 2010 at 10:40, Frans Bouma fr...@sd.nl wrote:
gee, then why did I got crashing queries when I ran
them, but
the
xml was valid? some magical ball hovering over my office,
which
influenced
the queries at runtime?
On Tue, Aug 17, 2010 at 10:46, Frans Bouma fr...@sd.nl wrote:
2) it's doing work that's unnecessary, as you're
testing work
which
can be done by a machine which doesn't make mistakes.
Did you read the part where I say this is
On Tue, Aug 17, 2010 at 11:21, Frans Bouma fr...@sd.nl wrote:
Not only that: in dynamic languages, it's THE ONLY step.
There's a reason why they code in dynamic languages results
in
unmaintainable piles of mud after a while
Then I wonder how they keep
By legacy I mean something that no one ever wants to change because
there are 200 RPG programs that utilize the table and if you make any
changes you may have to recompile all those programs on the AS400.
I know setting default constraints on the table is definately a way to
tackle it, it's just
Fabio,
Thanks for the suggestion. I tried that, but it had no effect on the
generated sql.
Gabe
On Aug 16, 8:47 pm, Fabio Maulo fabioma...@gmail.com wrote:
remove this
.SetFirstResult(0)
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To post to
Guys, I don't want to be rude, but don't you think that this neverending
discussion would be better if private ?
+1 for moving this elsewhere, I got 104 emails (well 105 when I send this)
with the subject
Friends, did you see this? A NH Designer!!!
I kinda lost the thread at around 25ish.
Miha,
I am also using FNH automapping in my project, and have a similar
requirement to map multiple ILists of the same type in some of my
classes.
Following advice from the FNH mailing list, I ended up with a solution
almost identical to yours, a base class (though it's not defined as
Abstract),
On Tue, Aug 17, 2010 at 10:46, Frans Bouma fr...@sd.nl wrote:
2) it's doing work that's unnecessary, as
you're
testing work
which
can be done by a machine which doesn't make
mistakes.
Did you
You don't have to import it in NH2.1.2.
You can maintain it in yours own sources (YourCompany..DLL)
Then you can define a typedef to have a short name.
On Tue, Aug 17, 2010 at 11:07 AM, MattO xant...@gmail.com wrote:
Awesome thanks so much! This fixed it.
To give anyone else who is
column name=blahblah... blah blah... default=aValue/
On Tue, Aug 17, 2010 at 11:18 AM, Frans Bouma fr...@sd.nl wrote:
Although you're working with a 'legacy' database (whatever that means),
isn't it better to define a default constraint on the field? When you use
'magic' values for null
http://code.google.com/p/codeconform/source/browse/ConfOrm/ConfOrm.Shop/CoolNaming/OneToManyKeyColumnApplier.cs
http://code.google.com/p/codeconform/source/browse/ConfOrm/ConfOrm.Shop/CoolNaming/OneToManyKeyColumnApplier.csHave
a look to comments...
btw... implements a patternapplier to
which version of NH are you using ?
with which dialect ?
On Tue, Aug 17, 2010 at 11:42 AM, Gabe Moothart gmooth...@gmail.com wrote:
Fabio,
Thanks for the suggestion. I tried that, but it had no effect on the
generated sql.
Gabe
On Aug 16, 8:47 pm, Fabio Maulo fabioma...@gmail.com wrote:
RECORD!!! in nhusers story.
This thread has more than 100 mails.
CONGRATULATION!!! to everybody
On Tue, Aug 17, 2010 at 11:14 AM, Diego Mijelshon di...@mijelshon.com.arwrote:
On Tue, Aug 17, 2010 at 10:40, Frans Bouma fr...@sd.nl wrote:
gee, then why did I got crashing queries
Let us pile on the hearty congratulations, such that this magnificent
accomplishment can never by surmounted!
CONGRATULATIONS ONE AND ALL :) :) :)
--Stuart
On Tue, Aug 17, 2010 at 10:39 AM, Fabio Maulo fabioma...@gmail.com wrote:
RECORD!!! in nhusers story.
This thread has more than 100
Fabio,
Using NHibernate 2.1.2.4000, with SqlServer2008 dialect.
Gabe
On Aug 17, 8:38 am, Fabio Maulo fabioma...@gmail.com wrote:
which version of NH are you using ?
with which dialect ?
On Tue, Aug 17, 2010 at 11:42 AM, Gabe Moothart gmooth...@gmail.com wrote:
Fabio,
Thanks for the
We have some tests about the usage of TOP.
I can't remember if the problem was there in NH2.1.2 but is should work
properly with NH3.
btw you can download the MsSQL2008 dialect from NH3 and compile it in your
own dll using a reference to NH2.1.2; then you can configure NH to use your
impl. (piece
It's like a marathon... you just have to keep going, no matter what :-D
Diego
On Tue, Aug 17, 2010 at 12:52, Stuart Laughlin stu...@bistrotech.netwrote:
Let us pile on the hearty congratulations, such that this magnificent
accomplishment can never by surmounted!
CONGRATULATIONS ONE AND
Its like you are both trying not become a Dr. McCoy ;)
On Tue, Aug 17, 2010 at 12:34 PM, Diego Mijelshon di...@mijelshon.com.arwrote:
It's like a marathon... you just have to keep going, no matter what :-D
Diego
On Tue, Aug 17, 2010 at 12:52, Stuart Laughlin
In fact I think there is a bug in gmail... after 100, mail my gmail has
created another conversation.
Oh wait, is a Bug or a Feature?
2010/8/17 Fabio Maulo fabioma...@gmail.com
RECORD!!! in nhusers story.
This thread has more than 100 mails.
CONGRATULATION!!! to everybody
On Tue, Aug 17,
OK, now you'll have to explain that reference to me :-D
Diego
On Tue, Aug 17, 2010 at 13:39, John Davidson jwdavid...@gmail.com wrote:
Its like you are both trying not become a Dr. McCoy ;)
On Tue, Aug 17, 2010 at 12:34 PM, Diego Mijelshon
di...@mijelshon.com.arwrote:
It's like a
If this thread would have been even marginally informative, imagine
how much we would all know by now :)
--Stuart
On Tue, Aug 17, 2010 at 11:34 AM, Diego Mijelshon
di...@mijelshon.com.ar wrote:
It's like a marathon... you just have to keep going, no matter what :-D
Diego
On Tue,
is the oposite to Spock, who is cold McCoy represents all human
emotions.
2010/8/17 Diego Mijelshon di...@mijelshon.com.ar
OK, now you'll have to explain that reference to me :-D
Diego
On Tue, Aug 17, 2010 at 13:39, John Davidson jwdavid...@gmail.com wrote:
Its like you are both
Gotcha...
For some reason, Spock seems more popular among us nerds... :-)
BTW, that gives me an idea for the next NHibernate debate... Star Wars or
Star Trek?
Diego
On Tue, Aug 17, 2010 at 13:46, José F. Romaniello jfromanie...@gmail.comwrote:
is the oposite to Spock, who is cold
STAR WARS OR YOU ARE A MORON!!111ONE!!!
--Stuart
On Tue, Aug 17, 2010 at 11:51 AM, Diego Mijelshon
di...@mijelshon.com.ar wrote:
Gotcha...
For some reason, Spock seems more popular among us nerds... :-)
BTW, that gives me an idea for the next NHibernate debate... Star Wars or
Star
OK, that was too controversial... let's get back on topic:
http://bit.ly/1w5H9I
Diego
On Tue, Aug 17, 2010 at 13:53, Stuart Laughlin stu...@bistrotech.netwrote:
STAR WARS OR YOU ARE A MORON!!111ONE!!!
--Stuart
On Tue, Aug 17, 2010 at 11:51 AM, Diego Mijelshon
I am working on a WPF app (MVVM) that is loading bids to display in a
grid. Being diligent in making sure the db is normalized, to display a
bid requires joining many other tables like JobType, Employee, Client,
Submissions some of which I really only need for a single field.
Naturally, I am
The session should be in (something wrapped by) the ViewModel.
But for displaying in a grid, you should also consider performance issues
(SELECT N+1)
Unless you are editing inside the grid, a DTO might be better, and you can
do a projection (with LINQ, HQL, etc) to get it in one piece (that
STAR WARS OR YOU ARE A MORON!!111ONE!!!
UPDATE [dbo].[votes]
SET value = value+1;
WHERE ThreadID = @p0
FB
--Stuart
On Tue, Aug 17, 2010 at 11:51 AM, Diego Mijelshon di...@mijelshon.com.ar
wrote:
Gotcha...
For some reason,
No please don't go back on the topic !!! ;-)
I'm sure that you and Frans are passionates, but juste please..
But if you plan to continue : could you just stop quoting-requoting-back
quoting-whatever quoting ?
f.
Le 17/08/2010 18:57, Diego Mijelshon a écrit :
OK, that was too controversial...
Blame Google, they killed Wave instead of promoting it.
Diego
On Tue, Aug 17, 2010 at 14:32, Frederic f...@free.fr wrote:
No please don't go back on the topic !!! ;-)
I'm sure that you and Frans are passionates, but juste please..
But if you plan to continue : could you just stop
Dr McCoy was always trying to get the last word at the end of each week's
Star Trek shows. It was only in one of the much later ones that he actually
succeeded.
On Tue, Aug 17, 2010 at 1:36 PM, Diego Mijelshon di...@mijelshon.com.arwrote:
Blame Google, they killed Wave instead of promoting it.
I'm wondering if this is the right way to use second-level caching along with
eagerly loading a collection.
This code is equivalent to a query that we are issuing from a fairly large
application. I've stripped it down to the very minimum while still throwing the
exception.
(My apologies for the
the Equals method you used is actually the object.Equals method
use Restrictions.Eq(...,...)
On Tue, Aug 17, 2010 at 4:05 PM, osman nuri katib
osmannurika...@gmail.comwrote:
ICriteria criteria = session.CreateCriteriaCorporation()
Fabio,
I tried it with NH3 alpha 2, but got the same results.
I've put together a small reproduction: http://gist.github.com/531280.
Just drop that in a new console application. It should run with fairly
little setup.
The Sql output of that test case is:
NHibernate: select TOP (@p0) order0_.Id
the most efficient way is querying for the first entity by some criteria,
get the ids of the first query, and do a query on the children where their
Father.Id in (idsOfFirstEntity)
then get the ids of the children, and get the grandchildren of the children
again with Father.Id in (idsOfChildren)
I'm wondering if this has something to do with the fact that only one
session is open for all 103 unit tests. I use Billy McCafferty's
implementation here which keeps one session around as shown in this
code:
private INHibernateSession ContextSession
{
get
I am using Castle and SQL Server DB and have gotten past the
sessionFactory problem with the new way of specifying proxyfactory-
I have a system that works in 1.2 but is giving me an error on 2.1.2
error is:
Resource: Mappings.method get_Guid should be 'public/protected
virtual' or 'protected
I think I figured out whats going on here.
During my TearDown tests I do this:
[TearDown]
public void TearDown()
{
manager.Session.RollbackTransaction();
manager.Dispose();
}
Dispose will actually close the session as shown with the
from what I can see- gettin gthis error on the this:
this._nhibernateConfiguration.BuildSessionFactory()
{The following types may not be used as proxies:
\Transportation.Interface.Table.DSICFCTL: method get_Guid should be
'public/protected virtual' or 'protected internal virtual'}
Has anyone had
It's self explanatory... you have an entity
called Transportation.Interface.Table.DSICFCTL with a property called Guid
which is not virtual.
Diego
On Tue, Aug 17, 2010 at 17:26, AAD anthonyd...@frontiernet.net wrote:
from what I can see- gettin gthis error on the this:
I think the error is being caused by this condition in the release
notes:
# Initialization time #
* The ProxyValidator check for internal virtual (to be
intercepted
by proxy need protected internal virtual)
Resource: Mappings.method get_Guid should be
I had mentioned that the CodeSmith templates could use some love and
maintenance before to you ;}
John Davidson
On Tue, Aug 17, 2010 at 4:09 PM, MattO xant...@gmail.com wrote:
I think I figured out whats going on here.
During my TearDown tests I do this:
[TearDown]
public
Um... by making the property public virtual/protected virtual/protected
internal virtual...?
Diego
On Tue, Aug 17, 2010 at 17:43, AAD anthonyd...@frontiernet.net wrote:
I think the error is being caused by this condition in the release
notes:
# Initialization time #
Tom,
even if I change my implementation to IList, the result is the same.
The problem with loading is that the SQL query which is issued is:
NHibernate: SELECT regularrat0_.Employee_id as Employee6_1_,
regularrat0_.Id as Id1_, regularrat0_.I
d as Id1_0_, regularrat0_.ValidFrom as ValidFrom1_0_,
For sure you have to create a new JIRA as critical issue
Thanks
--
Fabio Maulo
El 17/08/2010, a las 15:48, Gabe Moothart gmooth...@gmail.com escribió:
Fabio,
I tried it with NH3 alpha 2, but got the same results.
I've put together a small reproduction: http://gist.github.com/531280.
Just
This is a very old issue, but it's been closed:
http://216.121.112.228/browse/NH-1123
http://groups.google.com/group/nhusers/browse_thread/thread/94e5a057a4790b50
On Aug 17, 9:03 pm, Fabio Maulo fabioma...@gmail.com wrote:
--
You received this message because you are subscribed to the Google
no, this code will return me count of specific category:
select count(*) from products p inner join categories c on
p.category_Id=c.Id where c.Id=1
but what i need is category list with extra column that calculate product
count for each category
On Tue, Aug 17, 2010 at 14:28, José F. Romaniello
88 matches
Mail list logo