Re: [nhusers] NHibernate architecture in a clas library

2013-04-26 Thread Nexus
What is wrong with embracing the orm you are using, nobody has issues with embracing ef context's in their code, so why would we like to abstract nhibernate's session ? Is is repository, unit of work all in one -- You received this message because you are subscribed to the Google Groups "nhuse

[nhusers] Re: How to create a mapping file for VARCHAR(MAX) columns in NH 3.3.1

2012-08-28 Thread Nexus
Should be the most correct answer Regards -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/zdqhK0d0D30J. To post to this group, send email to nhusers@googlegroups.co

[nhusers] Re: Impose a particular order of entities for updates and inserts upon session flush

2012-08-28 Thread Nexus
What is the transaction isolation level you are using ? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/vbojgazSWUkJ. To post to this group, send email to nhusers@goo

[nhusers] Re: Unique column combination

2012-05-29 Thread Nexus
Although you could try to use natural-id ( caching consequence) I think unique-key is the one you are looking for see http://www.benday.com/2006/04/02/howto-create-a-unique-constraint-using-nhibernate/ for more info On 29 mei, 22:45, Ricardo Peres wrote: > natural-id is used for creating unique i

[nhusers] Re: Cascade delete issue

2012-03-24 Thread Nexus
Hi For the attachment group document you want to remove set the attachment group property to null before using flush or transaction commit. For more info check the documentation concerning bidirectional associations. Regards On 24 mrt, 04:59, Kolli Ayyappa wrote: > Hi, > > I have main table hav

[nhusers] TypeLoadException Thrown when Parent Class has lazy property

2011-09-13 Thread Nexus
Hey, When trying to create a failing bugtest for NH-2772, i stumbled upon a TypeLoadException thrown when the organization class has a lazy="true" property name, if you set it to lazy=false, everything seems to work perfectly. See https://github.com/tommarien/nhibernate-core/tree/NH2772 for test

[nhusers] Re: What is GA in NHibernate-3.2.0.GA stands for?

2011-09-12 Thread Nexus
Globally accepted or something :) -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com. For more options, vi

[nhusers] Re: NH3.2.0: public virtual getter & backend field

2011-09-12 Thread Nexus
It think this might be related to https://nhibernate.jira.com/browse/NH-2772 -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubsc

[nhusers] Re: NH3.2.0: public virtual getter & backend field

2011-09-12 Thread Nexus
As for the lazy properties path see http://ayende.com/blog/4377/nhibernate-new-feature-lazy-properties "One last word of caution, this feature is implemented via property interception (and not field interception, like in Hibernate). That was a conscious decision, because we didn’t want to add a b

[nhusers] Re: NH3.2.0: public virtual getter & backend field

2011-09-10 Thread Nexus
proxyvalidator will give you errors when trying to compile mappings for not an auto property !!!, so the test you supplied is very very strange I think we need a clearer example before we can understand what is going on. Nexus -- You received this message because you are subscribed to the Google

[nhusers] Re: Nhibernate 3.2 vs Nhibernate 2.1 :Like & maximum size

2011-09-06 Thread Nexus
This seems to be a bug, please submit to jira , perhaps include unit test for it see nhforge for the correct way to do so -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe fr

[nhusers] Re: LINQ to NHb and StartsWith, EndsWith, Contains on AnsiString columns.

2011-08-26 Thread Nexus
Have you supplied ansistring as type in the mapping ? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com.

[nhusers] Re: parent entity in 2st level cache .. children are not, and spawn n+1

2011-08-19 Thread Nexus
Maybe you forgot to add collection cache ? Post your mappings and session configuration, because if you forget to add collection-cache in nhibernate config or under bag xml attribute you only have entity cache. -- You received this message because you are subscribed to the Google Groups "nhusers

[nhusers] Re: why burrow is not updated from past two year

2011-08-19 Thread Nexus
Don't forget to try and contribute to the burrow community by supplying a patch or contacting fabio maulo, see other users may use your changes :) -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegrou

[nhusers] Re: why burrow is not updated from past two year

2011-08-18 Thread Nexus
Take source of burrow and try to fix the reference to nhibernate -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googleg

[nhusers] Re: why burrow is not updated from past two year

2011-08-17 Thread Nexus
Apparantly the owner of the burrow project is no longer maintaining it, and according to blog he has gone ruby (kailuowang) -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe

[nhusers] Re: Prepared SQL has invalid column name error

2011-08-17 Thread Nexus
Enable full logging and see what gets send to the database or use nhibernate profiler -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhuser

[nhusers] Re: HELP!!! Nhibernate bug with OleDbProvider

2011-08-10 Thread Nexus
Jack, Why are you using oledbprovider on sqlserver ? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com.

[nhusers] Re: L2 cache providers - advice

2011-08-03 Thread Nexus
I have had pretty decent results with memcache in the past, why don't you use that one ? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhu

[nhusers] Re: appropriate mapping a string field length (mapping by code)

2011-07-11 Thread Nexus
Maybe related to http://www.basderaad.nl/2011/02/large-strings-in-nhibernate-3-0/ ? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers

[nhusers] Re: NHibernate does extra select on missing relations, even using eager fetching.

2011-07-01 Thread Nexus
As i crawled trough JIRA to find the related bugs, i stumbled upon this comment Tomer Avissar commented on NH-1001 (Select statement issued for each not-found=ignore) saying: It's been a while since I logged this, but if I recall correctly, the issue is if you like to view it that way, is that the

[nhusers] Re: Is .Load the only way to get Parent Id in a query?

2011-06-30 Thread Nexus
Again i really think that getting the id of the parent should not trigger lazy load, as confirmed in BasicLazyInitializer Code : public virtual object Invoke(MethodInfo method, object[] args, object proxy) { string methodName = method.Name;

[nhusers] Re: Explanation of many-to-many

2011-06-29 Thread Nexus
As taken from nhibernate documentation, i don't many to many needs cascading, because there is no real object to cascade to -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@g

[nhusers] Re: Is .Load the only way to get Parent Id in a query?

2011-06-29 Thread Nexus
Jason, Why should the second trigger lazy loading, besides from the fact if you use not-found=ignore or property-ref attribute ? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubs

[nhusers] Re: NH 3.1 hbm mapping changes?

2011-06-29 Thread Nexus
Shatl, Yes, he means private setters only, private setters are not interceptable as i know off -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email

[nhusers] Re: Unique Constraint Idbag

2011-06-27 Thread Nexus
Try expanding the key and many-to-manu tags like this Could be there :) -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr

[nhusers] Re: Testing ICriteria builder

2011-06-27 Thread Nexus
Why don't you test it integrated, with a database, or SQLite of you prefer ? Seems easier -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to n

[nhusers] Re: How to constrain queries by dynamic component properties

2011-02-04 Thread Nexus
As far as i know, it isn't possible using ICriteria, QueryOver etc queries, but i'm sure that HQL Supports it (look for quering map trough hql) for example: FROM Person p WHERE p.Attributes['SSN'] is null Kind regards -- You received this message because you are subscribed to the Google Grou

[nhusers] Re: Child collection update

2010-12-30 Thread Nexus
Why are you using _orderModel.SaveCustomerOrder(customerOrder); ??? isn't a flush sufficient ? -- 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 group, send email

[nhusers] Re: QueryOver SelectList behavior

2010-12-30 Thread Nexus
Roy, QueryOver is just a wrapper over existing ICriteria Queries, if i remember correctly the above would also fail in a simple criteria query. Regards -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@goo

[nhusers] Re: Mapping many-to-one with join (or something similar)

2010-10-29 Thread Nexus
Christian, Please look at the localization techniques described in http://nhforge.org/wikis/howtonh/localization-techniques.aspx. Kind regards -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@googlegroups

[nhusers] Re: NotEqual restriction on projection aggregate

2010-10-27 Thread Nexus
Mike Just looked into source of nhibernate, i guess not because still standing NotExpression { ... public override IProjection[] GetProjections() { return null; } } Regards -- You received this message because you are subscribed to the

[nhusers] Re: NotEqual restriction on projection aggregate

2010-10-26 Thread Nexus
rride IProjection[] GetProjections() { return criterion != null ? criterion.GetProjections() : null; } } This is also a problem with And/or etc Kind regards Nexus -- You received this message because you are subscribed to the Google Groups "nhusers" group.

[nhusers] Re: Simple bag doesn't work

2010-10-26 Thread Nexus
Hey, Don't you mean -- 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 group, send email to nhusers+unsubscr...@googlegroups.com. For more o

[nhusers] Re: Adding to collections to implement persistence by reachability

2010-10-25 Thread Nexus
SOA and DDD mix very well if you implement CQRS :) Kind regards -- 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 group, send email to nhusers+unsubscr...@googleg

[nhusers] Re: Adding to collections to implement persistence by reachability

2010-10-22 Thread Nexus
en you add something (because the holder of the foreign key is the weblog entity). Kind regards Nexus -- 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

[nhusers] Re: Adding to collections to implement persistence by reachability

2010-10-21 Thread Nexus
Hi, Why are you calling session.update(user) in the first example And its's normal that the user is loaded don't use load use get, the only difference between lazy is extra or lazy = true is related to the collection of Weblogs Kind regards -- You received this message because you are subscrib

[nhusers] Re: select from a projection of composite keys

2010-10-15 Thread Nexus
Hi, If the Entity has a composite key mapping you still should be able to use Projection.Id() Regards -- 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 group, sen

[nhusers] Re: How to determine is persistent entity attached to session

2010-10-14 Thread Nexus
Session.Contains() i thought it existed Regards -- 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 group, send email to nhusers+unsubscr...@googlegroups.com. For m

[nhusers] Re: row lock with nhibernate 2.2 against sql server 2005

2010-10-13 Thread Nexus
Dave, Row, table or page locking is triggered by the database itself, mostly it's related to using unindexed columns to select the row Regards -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@googlegroups

[nhusers] Re: DateTime millisecond precision in SQL Server 2008

2010-10-13 Thread Nexus
Chris Please take a look at following blog article, should answer your question :) http://nhforge.org/blogs/nhibernate/archive/2009/03/11/nhibernate-and-ms-sql-server-2008-date-time-datetime2-and-datetimeoffset.aspx Kind regards -- You received this message because you are subscribed to the Go

[nhusers] Re: Performance when updating varbinary

2010-09-29 Thread Nexus
n = @p0, Data = @p1 > WHERE Id = @p2; @p0= '83a6dcb8-e67d-4df2-b532-ea54c87dbb96', @p1 = > 'System.Byte[]', @p2 = '1' > > Thanks a lot for your help. > > > > On Wed, Sep 29, 2010 at 5:10 PM, Nexus wrote: > > Euh i hope you are have an entity(class mappin

[nhusers] Re: Using Expression inside Projection Method

2010-09-29 Thread Nexus
Start by mapping a formula property (Total) into sales Then you can sum in projections (otherwise you have to revert to bad SqlExpression stuff) On 18 sep, 23:00, Xminder wrote: >     How do I write the below with ICriteria and Projections.Sum: > >     Select item_name, sum(unit_price * amount)

[nhusers] Re: Switch (dealing with nhibernate)

2010-09-29 Thread Nexus
Switch has a default:(switch) which is used for otherwise so if not IMS or TPF what then ??? On 26 sep, 14:56, Diego Mijelshon wrote: > That's a C# error, not > NH.http://msdn.microsoft.com/en-us/library/06tc147t(v=VS.100).aspx > >     Diego > > > > On Sun, Sep 26, 2010 at 04:39, adherence wrot

[nhusers] Re: Performance when updating varbinary

2010-09-29 Thread Nexus
> snapshot is taken after update the varbinary field from 3 bytes to > 2MB. As you can see, the most expensive operation is > SqlCommand.ExecuteNonQuery. However, the same ExecuteNonQuery in raw > sql takes less than a second. > > > > On Tue, Sep 28, 2010 at 10:59 AM, N

[nhusers] Re: Performance when updating varbinary

2010-09-28 Thread Nexus
Juanma, As a general advice don't update blobs think of them as ValueObjects(DDD). Try removing the binarydocument reference (3bytes version) and adding another (8MB version), should improve speed drasticly due to dirty check -- You received this message because you are subscribed to the Google

[nhusers] Re: ISeries calls using NHibernate is locking files

2010-09-28 Thread Nexus
Brain, Which version of Client Access are you using ? V5R4 or V6R1 ?? Kind regards -- 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 group, send email to nhusers

[nhusers] Re: Lazy loading "trap": private property setter, internal method calling it

2010-03-24 Thread Nexus
Thanks for the update :), i personally don't trust anything with foo(fu) or bar in it :P -- 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 group, send email to nhu

[nhusers] Re: Lazy loading "trap": private property setter, internal method calling it

2010-03-24 Thread Nexus
Hi, Without questioning the implementation ;), it has nothing to do with proxying as the proxy should have loaded all values as a result from "Assert.AreEqual("A", obj.PrivateSetter) " Or is it caused by the private set {} itself ?? (What is the mapping here nosetter.camelcase ???), could be tha

[nhusers] Re: Help

2010-03-19 Thread Nexus
You know you make me wanna (Shout!) Kick my heels up and (Shout!) Throw my hands up and (Shout!) Throw my head back and (Shout!) Come on now Don't forget to say you will Don't forget to say Yeah, yeah, yeah (Say you will) Say it right now, baby (Say you will) Well, come on, come on (Say you will) S

[nhusers] Re: how to say this in HQL

2010-03-17 Thread Nexus
Mmm, strange, never thought nhibernate supported something not :P !!! I thought i saw something about multiquery on Ayende (Rahien) blog about unions ??? maybe a tip in the right directions KR -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post

[nhusers] Re: Entity and aggregate in the same query

2010-03-16 Thread Nexus
Just as a remark, you should do it in T-SQL also :P, so why not in HQL -- 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 group, send email to nhusers+unsubscr...@g

[nhusers] Re: Entity and aggregate in the same query

2010-03-16 Thread Nexus
Try this select cat, count(elements(co)) from Category cat left join cat.Courses co where cat.ParentCategory is null and (co.Visible=true or co.Visible is null) and (co.Active=true or co.Active is null)

[nhusers] Re: Mapping a Guid Id to String database column

2010-03-15 Thread Nexus
Change : public virtual Guid Id { get; set; } ==> public virtual string Id { get; set; } And you should be fine -- 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 th

[nhusers] Re: order of sql commands

2010-03-15 Thread Nexus
Why do you do a flush after a rollback , not that i really matters but still is appears strange to me !! _folderDAO.RollbackTransaction(); invokes Transaction.RollBack() Session.Flush() Session.Close() Also call Session.Flush() after saving each folder should fix entire te

[nhusers] Re: Session management problem in Unit of Work pattern

2010-03-15 Thread Nexus
Refreshing your contracter, or evicting it from the session should do the trick -- 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 group, send email to nhusers+unsu

[nhusers] Re: How to mock DetachedCriteria?

2010-03-15 Thread Nexus
Easy answer, don't :) Nhibernate has enough tests running and succeeding on CriteriaQueries, mock your repositories or dao's . Otherwise do your tests against a db, as these are integration tests Kind regards, -- You received this message because you are subscribed to the Google Groups "nhuse

[nhusers] Re: Newbie Question on Primary key

2010-03-11 Thread Nexus
Show us the money, euh , mapping :P -- 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 group, send email to nhusers+unsubscr...@googlegroups.com. For more options,

[nhusers] Re: Nhibernate and property localization

2010-03-11 Thread Nexus
As a side note , or even a question that popped up to talking with a dba on this : I understand these sort of patterns if you want to dump your resource files in a database, but the underlying question is it really that important and frequent that an application should be able to add an additional

[nhusers] Re: order of sql commands

2010-03-09 Thread Nexus
Show us some code please, this isn't the way it is supposed to work ! This should trigger twice "select max(id) from entity table" -- 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 unsub

[nhusers] Re: nhburrow long conversation

2010-03-05 Thread Nexus
I personally don't like long conversations as they tend to cover the real issues with web development and that is following So you select a customer in a long conversation, you retrieve its details, page get transmitted to client, user goes to toilet, meanwhile customer gets removed (updated), and

[nhusers] Re: Advice : product type

2010-03-05 Thread Nexus
The most important question to answer is whether or not a book can become a dvd, in other words do you have need for type mutability ??? If the answer is no, which i think it is, you can use a discriminator, to map it to different type, see nhibernate manual Kind regard Tom Marien -- You recei

[nhusers] Re: NH-1280 Related : HAVING CriteriaQuery

2010-03-04 Thread Nexus
2.1.x is no more supported, the next version will be NH3.0 (actual trunk) ??? Is there a release yet of 3.0 ? Or is one planned ? If the answer to above is no-no then 2.1.x should be supported, just my oppinion :P -- You received this message because you are subscribed to the Google Groups "n

[nhusers] Re: NH-1280 Related : HAVING CriteriaQuery

2010-03-04 Thread Nexus
Please, just point me in the right direction, if someone says from which codebase to start from i can even supply a patch !!! -- 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 unsubscrib

[nhusers] Re: NH-1280 Related : HAVING CriteriaQuery

2010-03-04 Thread Nexus
Do i need to file a bug in JIRA ??? -- 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 group, send email to nhusers+unsubscr...@googlegroups.com. For more options,

[nhusers] Re: NH-1280 Related : HAVING CriteriaQuery

2010-03-03 Thread Nexus
eed to get this fixed So for a not expression it is easy i just return nested criterions.projections But what must i do for Or,And,Junction,Disjunction etc should it return a new IProjection[] with left and right projections ??? On 3 mrt, 12:52, Nexus wrote: > As an update on this it seems tha

[nhusers] Re: NH-1280 Related : HAVING CriteriaQuery

2010-03-03 Thread Nexus
work for some reason when i strip not it works Please advice On 2 mrt, 13:28, Nexus wrote: > Hi > > I am using 2.1.2 GA, when i try to use a > Add(Restrictions.Gt(IProjection projection,0) || > Restrictions.Gt(IProjection projection,0) ) > > It is no longer using having c

[nhusers] Re: DB2400 Dialect

2010-02-05 Thread Nexus
An update on this : if i use Projections.SqlProjection("0 as dummyF", new[] { "dummyF" }, new[] { NHibernateUtil.Boolean }) i can get it to work property , if i can just figure out how to make Projections.Constant like projection for instance ValueProjection that doesn't make use of parameters but

[nhusers] Re: How can I map a "value type" that contains an "entity", where immutability is maintained (by invokin

2010-02-04 Thread Nexus
Hi To be clear a valueobject can have a persistence identifier, it just means that the persistence id has no meaning -- 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 t

[nhusers] Re: Aggregate Root + Collections + Updates

2010-02-04 Thread Nexus
Paul I am a developer who is keen on DDD, so post is your aggregate root and comment is a value object or another entity ? So post has a one-to-many relationship with comment(which seems to be a value object at first glance btw) , this means according to DDD rules comments should only be availabl

[nhusers] Re: WCF And NHibernate: enable lazy loading

2010-02-03 Thread Nexus
As a general guideline don't expose your domain(poco or not) model trough wcf, use screen bound dto's (see http://blog.jpboodhoo.com/CommentView,guid,21fe23e7-e42c-48d8-8871-86e65bcc9a50.aspx) On 3 feb, 08:13, Peter Derwa wrote: > Hi Allan, I don't want to remove the lazy loading, i want to overw

[nhusers] Re: Mapping multiple parent relationships efficiently

2010-02-03 Thread Nexus
Hi, This can be formulated as SELECT N+1 issue (see http://ayende.com/Blog/archive/2008/12/01/solving-the-select-n1-problem.aspx) But this link is not a fix for your particular situation, you were stating that you are working with a legacy database model, so i guess adapting the schema a little is

[nhusers] Re: DB2400 Dialect

2010-02-03 Thread Nexus
> > 2010/2/2 Nexus > > > > > Hi > > > When we use Projection.Conditional(Projection ..., true part , false > > part), where the true and false parts are Projections.Constant > > (true),Projections.Constant(false) > > > We get an error, because DB2

[nhusers] DB2400 Dialect

2010-02-02 Thread Nexus
Hi When we use Projection.Conditional(Projection ..., true part , false part), where the true and false parts are Projections.Constant (true),Projections.Constant(false) We get an error, because DB2400 cannot have a "case when " structure where both the true as the false part are parameters Do

[nhusers] Re: Question about exceptions

2010-01-27 Thread Nexus
Hi Look at Spring.Net, they wrap them in a robust manner :) On 22 jan, 16:15, lg wrote: > Hi > Trying to write a rubust application based on NHibernate. When you do > a operation like > > session.save(item) > > a number of exception can be thrown from the framework. > > I think that it is a bad

[nhusers] Re: Extremely large collection / resultset?

2010-01-27 Thread Nexus
Try using paging instead of loading 20 rows into a grid, it makes me suspect that your are reworking a lecagy system, where business still needs to evolve :P -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhu

[nhusers] Re: Cascading save with one-to-one mapping

2010-01-27 Thread Nexus
One-to-one is a legacy mapping type, don't use if you avoid. How can nhibernate know that there is an object in table B without joining it in the query (because it has the same identifier), lazy in a one-to-one is not advised, one-to-one is just to split tables up nothing more nothing less Kind r

[nhusers] Re: Extremely large collection / resultset?

2010-01-27 Thread Nexus
For that kind of data don't use winforms, binding either :P On 26 jan, 16:29, Fabio Maulo wrote: > I hope you will implements DataAccess "Logic" > > 2010/1/26 ehnn > > > > > Thanks for the responses. Based on this I will implement my own > > business logic for dealing with this amount of records

[nhusers] SetFetchMode on ICriteria

2009-10-29 Thread Nexus
Hi, According to the nhibernate documentation in the source FetchMode.Select (equals Lazy) and should /// /// Fetch eagerly, using a separate select. Equivalent to /// fetch="select" (and outer-join="false") /// But this does nothing, so it is not the same as fetch="select" in your mapping !

[nhusers] Re: How to measure database time

2009-10-02 Thread Nexus
look at http://ayende.com/Blog/archive/2008/10/04/the-nhibernate-profiler.aspx (NHProf) On Oct 2, 12:47 pm, "Bruno Wouters" wrote: > Hi all, > > Is there a way to measure the total time spent by the database executing > queries etc? > > I would like to display the number of seconds that are spen

[nhusers] Re: cascade="delete-orphans"

2009-10-02 Thread Nexus
setting data property to null, in the db the foreign key from filedata (table) to file(table) will be set to null By using delete-orphan it will be removed from the filedata table. I do hope this is still making sense to you :P Kind regards Nexus On Oct 2, 9:55 am, csetzkorn wrote: > Let me

[nhusers] Re: cascade="delete-orphans"

2009-10-01 Thread Nexus
Hi, This only implies on objects loaded in the session !!! Delete-orphan deletes orphans as long as they are not referenced by any other object in the session Kind regards Nexus On Oct 1, 11:18 am, csetzkorn wrote: > Hi, > > Sure that makes sense. However, I thought that NHibern

[nhusers] Re: NHibernate unique constraints

2009-09-29 Thread Nexus
Hi, Could it be that the flushmode of your session is on autoflush, because then it would mean that the query that is checking the uniqueness is calling flush ! Kind regards Nexus On Sep 29, 8:54 am, "Francisco A. Lozano" wrote: > Maybe your entity is already persistent by

[nhusers] Abstracting away from Nhibernate

2009-09-25 Thread Nexus
Hi, I would like to abstract away from nhibernate.Criterions.ICriterion, to prevent a leak in my upper layers, does anyone has tried to implement/wrap its own IMyCriterion that can be resolved to an ICriterion ??? The context of this question lies in the creation of query objects, i would like t

[nhusers] Re: Inverse attribute?

2009-08-06 Thread Nexus
David, The problem you are facing is the difference between inverse option and cascading options !!! Specify inverse=true for each collection that you have a different mapping file for, this means that when the schema gets created he needs to investigate the underlying class for all constraints,

[nhusers] Re: update a locked field without version going up

2009-08-04 Thread Nexus
Don't !!, it is a breach in the versioning process My advise extract the locking behaviour from your entity ! On 4 aug, 08:51, Peter Derwa wrote: > Hey guys > > I'm using the Versioning of NHibernate to keep track of the > versioning. > Recently we've added the possibility to lock records w

[nhusers] Re: DDD, value objects and IDs

2009-08-02 Thread Nexus
Hi In my humble opinion, it should not be a breach of the DDD concept to have the id in the valueobject, it is just there for database concerns, i has no other meaning. It should also be included out of your equals etc, because only the values of the valueobject matter (but i am sure that was al

[nhusers] Re: Update of parent and child records not working

2009-07-30 Thread Nexus
in the child mapping change this CHILD: You have duplicate mapped once explicit see above and once implicit see below Greetings On 29 jul, 15:05, Teclioness wrote: > Hi, > > I have a parent child relationship tables set up. In the UI, I show > the details of parent and child deta

[nhusers] Re: How to map two tables with a single mapping file.

2009-07-30 Thread Nexus
Hi there, So we are talking about entities in our domain model ? Then why not just public class Employee { int Id { get; protected set; } string Name { get;set; } EmployeeType Type { get;set; } string EmployeeTypeName { get { return Type!= null ? Type.Name : null; } } } If not, so

[nhusers] Re: Rhino commons with 2.1 ga

2009-07-30 Thread Nexus
Checkout https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk Greetings On 30 jul, 13:05, Niclas Pehrsson wrote: > Is there any compiled version of Rhino commons with NHibernate 2.1 ga. > There are no compiled files on the > sitehttp://sourceforge.net/projects/rhino-tools/files/ -

[nhusers] Re: Milliseconds being changed by NHibernate 2.0.1GA?

2009-07-30 Thread Nexus
Graham, You are both right, SQL (pre 2008) has an issue that a datetime is only accurate up to 3.33 milliseconds Override your dialect as follows and you should be seeing more correct behavior, the value stored in your memory object needs to be rounded to the milisecond so don't forget to refresh

[nhusers] Re: Static lookup classes

2009-07-30 Thread Nexus
stalia > Session.Update(); > Session.Flush(); >  address.Country = Countries.Germany > Session.Update(); > Session.Flush(); > > Assert.AreSame(Countries.Germany, address.Country) > > Cheers. > > 2009/7/30 Nexus > > > > > > > Hey > > > At first set y

[nhusers] Re: Static lookup classes

2009-07-30 Thread Nexus
Hey At first set your id to assigned, use guid or something like that. Second overload your Equals, gethashcode, (use id as equalifier) , also overload operators Then create a static class countries public static class Countries { public readonly static Country Australia = new Country ("EF989

[nhusers] Re: Setting Primary Key Name

2009-07-29 Thread Nexus
You could try this It works but creates an index besides the primary key Greetings On 27 jul, 18:39, Jan Limpens wrote: > 2009/7/27 Nexus > > > > >   > >       > >     > > > Is is not the column="Id" ? > > No, not the

[nhusers] Re: NHibernate and Unity Application Block

2009-07-29 Thread Nexus
We are using unity as DI Container, no issues with it , use 1.2 though, with a custom written session management, that resides in di Greetings On 28 jul, 18:03, Raul Carlomagno wrote: > castle has a facility to manage nhibernate's session > spring.net has a component to manage session > > i thi

[nhusers] Re: NHibernate.ADOException : could not delete collection: MySql.Data.MySqlClient.MySqlException : Column set to default value; NULL supplied to NOT NULL column 'POId' at row 1

2009-07-28 Thread Nexus
Try this kind regards On 28 jul, 03:26, Ian Escarro wrote: > I have an error in deleting a master/detail relationship. I have a > PurchaseOrder class and a PurchaseOrderItem class. These are the mapping. > > >     namespace="Bogetz.Elephant.Model" assembly

[nhusers] Re: Entity Updation

2009-07-27 Thread Nexus
You could use projections, or maybe map the two entities by a discriminator greetings On 27 jul, 11:50, Sachin wrote: > Thanks Nexus!! > > I know it can be handeled in code as I can create two entities where I > can  fetch values and can create a common entity out of it,  but it

[nhusers] Mixed Support

2009-07-27 Thread Nexus
Hi 1) When we use native generator, in code it will first check if the dialect can provide identity values and then sequences, and as a failback it uses table-hilo. I think most people prefer the use of sequences over identities if the database supports it. 2) Could we provide a nativehilo stra

[nhusers] Re: Setting Primary Key Name

2009-07-26 Thread Nexus
Is is not the column="Id" ? Kind regards On 26 jul, 21:52, James Gregory wrote: > AFAIK you can't set the primary key name. Foreign keys yes, primary no. > > > > On Sun, Jul 26, 2009 at 8:49 PM, Jan Limpens wrote: > > Hi there, > > > for my database-objects to work (full text i

[nhusers] Re: Help on complex mapping using NHibernate

2009-07-25 Thread Nexus
>> and i am trying to generalize InCompleteOrder/InCompleteOrderItem and > >> CompleteOrder/CompleteOrderItem into only Order and OrderItem class. i > >> was able to map InCompleteOrder and CompleteOrder class into something > >> like: > > >> InCompOrder -

  1   2   >