[nhusers] Re: XML Database

2009-10-13 Thread Fabio Maulo
We have a feature started but there isn't a real request to end it. EntityMode.Xml. The query language is HQL or Criteria. 2009/10/13 Dmitiry Nagirnyak > Hi, > > Just to make sure. > NHibernate does not support file based (XML or so) database. Right? > > Has anybody tried to implement file-based

[nhusers] XML Database

2009-10-13 Thread Dmitiry Nagirnyak
Hi, Just to make sure. NHibernate does not support file based (XML or so) database. Right? Has anybody tried to implement file-based "dialect" for that? Is it generally possible? (The NH operates in SQL language). Cheers, Dmitriy. http://dnagir.blogspot.com --~--~-~--~~~

[nhusers] Re: Encrypting binary columns

2009-10-13 Thread kasvis...@gmail.com
In the mapping file, I have declared the column as BinaryBlob. I am not sure if the EncryptedString could be used directly. On Oct 13, 3:34 pm, Tuna Toksoz wrote: > It is basically the same? > > Tuna Toksöz > Eternal sunshine of the open source mind. > > http://devlicio.us/blogs/tuna_toksozhttp

[nhusers] Re: Encrypting binary columns

2009-10-13 Thread Tuna Toksoz
It is basically the same? Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Tue, Oct 13, 2009 at 10:32 PM, kasvis...@gmail.com wrote: > > Hi, > > I am developing an application that is storing sensit

[nhusers] Encrypting binary columns

2009-10-13 Thread kasvis...@gmail.com
Hi, I am developing an application that is storing sensitive data. I have implemented the IUserType EncryptedString to encrypt and decrypt strings. But I also have a requirement to encrypt any attachments before saving it to the database. How do I go about implementing an IUserType for encryptin

[nhusers] Re: Linq To NHibernate: Where clause invoking Model public virtual method fails

2009-10-13 Thread CarmineM
Hi Stefan, Thanks for your help! On 12 Ott, 16:12, Stefan Wenig wrote: > you need to draw a line between what can be executed in the DB > (transformed to SQL clause) and what needs to be executed in memory > (calling methods): Browsing the web I found indications that, as of now, Linq To NHib

[nhusers] Re: Nhibernate Linq and Date management

2009-10-13 Thread José F . Romaniello
Thank you, I will have a look. 2009/10/13 Tuna Toksoz > Short answer, this is not implemented otherwise.It can be done, but nobody > did it. > > Tuna Toksöz > Eternal sunshine of the open source mind. > > http://devlicio.us/blogs/tuna_toksoz > http://tunatoksoz.com > http://twitter.com/tehlike >

[nhusers] Re: Hilo behavior

2009-10-13 Thread Fabio Maulo
to prevent big PK fragmentation the High, NH, is per-table 2009/10/13 cws > > Hello! > > I was wondering a little bit on the behavior of the hilo-generator. > > Mappings: > > > > > > > > > > > > > > > > > > > >

[nhusers] why unchanged items in a collection are updated when root is update?

2009-10-13 Thread Meidan
I have a root entity which has a set mapping collection of child entities when I add a child to the root and update it, there is an update statment for each of its unchanged childs: UPDATE Childs SETChildName = 'aa' /* @p0 */, RootId = 16 /* @p1 */ WHER

[nhusers] Hilo behavior

2009-10-13 Thread cws
Hello! I was wondering a little bit on the behavior of the hilo-generator. Mappings: Code: BurrowFramework framework = n

[nhusers] Re: NHibernate CreateSQLQuery Transaction Issue…

2009-10-13 Thread Fuehner
Fabio-- Not sure I follow... All I'm trying to do is make a call to a stored procedure and get back results in a list... Session.CreateSQLQuery("exec MyStoredProc").List(); Is this not the appropriate approach to call a stored procedure..? On Oct 13, 11:09 am, Fabio Maulo wrote: > 2009/10/1

[nhusers] Re: caching issue with Eval

2009-10-13 Thread graphicsxp
sorry, I have no idea why my message was posted 3 times ! On 13 oct, 19:24, graphicsxp wrote: > AFAIY it is part of the cached query. If I debug it and look at the > Owner property, it is not proxied.  Plus, I did a quick test by > retrieving the Owner property in the code-behind whenever I move

[nhusers] Re: caching issue with Eval

2009-10-13 Thread graphicsxp
AFAIY it is part of the cached query. If I debug it and look at the Owner property, it is not proxied. Plus, I did a quick test by retrieving the Owner property in the code-behind whenever I move from one page to the other in my DataList, and the Owner is NOT fetched from the database, it is fetc

[nhusers] Re: caching issue with Eval

2009-10-13 Thread graphicsxp
AFAIY it is part of the cached query. If I debug it and look at the Owner property, it is not proxied. Plus, I did a quick test by retrieving the Owner property in the code-behind whenever I move from one page to the other in my DataList, and the Owner is NOT fetched from the database, it is fetc

[nhusers] Re: caching issue with Eval

2009-10-13 Thread graphicsxp
AFAIY it is part of the cached query. If I debug it and look at the Owner property, it is not proxied. Plus, I did a quick test by retrieving the Owner property in the code-behind whenever I move from one page to the other in my DataList, and the Owner is NOT fetched from the database, it is fetc

[nhusers] Re: caching issue with Eval

2009-10-13 Thread Fabio Maulo
what should do NH if the Owner is not part of the cached query ? 2009/10/13 graphicsxp > > Hi, > > I'm binding a DataList control in ASP.net to an IList of Video > entities returned by a NH query. The DataList is paginated and if I > move from one page to the other, NH gets the data from the 2nd

[nhusers] caching issue with Eval

2009-10-13 Thread graphicsxp
Hi, I'm binding a DataList control in ASP.net to an IList of Video entities returned by a NH query. The DataList is paginated and if I move from one page to the other, NH gets the data from the 2nd level cache because I've cached the query. The entities in my IList look like this : Video {Id, T

[nhusers] Re: Nhibernate Linq and Date management

2009-10-13 Thread Tuna Toksoz
Short answer, this is not implemented otherwise.It can be done, but nobody did it. Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Tue, Oct 13, 2009 at 7:53 PM, José F. Romaniello wrote: > I'm expl

[nhusers] Nhibernate Linq and Date management

2009-10-13 Thread José F . Romaniello
I'm exploring the NH.Linq project (based on criteria)... and I can't understood the datetime management..Specialy this: https://nhcontrib.svn.sourceforge.net/svnroot/nhcontrib/trunk/src/NHibernate.Linq/src/NHibernate.Linq/SqlClient/SqlClientExtensions.cs Why we can't just do?: from a where a.Dat

[nhusers] Re: Password Hashing In Nhibernate

2009-10-13 Thread Fabio Maulo
The View has a string with the password wrote by user.The Presenter will create the DTO with that password. The Model/Service will receive the DTO, will calculate the hash and will assign it to the entity. That all Business Logic without NH involved in it. 2009/10/13 Maxus > > Hi People, > > I

[nhusers] Re: NHibernate CreateSQLQuery Transaction Issue…

2009-10-13 Thread Fabio Maulo
2009/10/13 Fuehner > > My question is; how can I tell NHibernate I do not want to use a > transaction..? > > My question is. How you can execute a query, in a RDBMS, without, at least, an implicit transaction ? -- Fabio Maulo --~--~-~--~~~---~--~~ You received t

[nhusers] Re: Exception with loading log4net

2009-10-13 Thread Oskar Berggren
Have you checked that the file log4net.dll was uploaded correctly? /Oskar 2009/10/13 thaianhduc : > > Does anyone have clue about this one? > > I have 2 projects, one for domain model and one for web. I have a > class to take care of initialize NHibernate and Session in site domain > model asse

[nhusers] Re: How do you optimize a "contains" query???

2009-10-13 Thread Oskar Berggren
No, that was intended as HQL. /Oskar 2009/10/13 Chris F : > > Thanks Oskar, > > That will require LINQ to NH, which I can't execute at the moment, > but I plan on upgrading project dependencies in the near future so > I'll give it a shot when I do. > > - Chris > > On Oct 9, 6:10 pm, Oskar Bergg

[nhusers] SELECT N+1 with freetext / SQL / HQL query

2009-10-13 Thread Jak Charlton
I am trying to do a freetext query, but both of the following are giving me SELECT N+1 according to NHProfiler ... am I missing something obvious here? Cheers Jak list = session.CreateSQLQuery("Select DISTINCT CurriculumVitae.* from CurriculumVitae where Contains (Curriculum

[nhusers] HQL Search with Join Produces Incorrect SQL (I think)

2009-10-13 Thread TimmyC
So I think I found an issue with the HQL to SQL mapping. Of course this could just be something I'm doing wrong, which is why I'd be interested in some feedback. (c: Here is the HQL: FROM Location loc WHERE ((loc.LocationName LIKE :SearchValue) or (loc.LocationShortName LIKE :SearchValue) or (loc

[nhusers] Exception with loading log4net

2009-10-13 Thread thaianhduc
Does anyone have clue about this one? I have 2 projects, one for domain model and one for web. I have a class to take care of initialize NHibernate and Session in site domain model assembly. Everything worked perfectly in localhost. However when i uploaded the code to server. I got this exception

[nhusers] Re: Linq To NHibernate: Where clause invoking Model public virtual method fails

2009-10-13 Thread Stefan Wenig
you need to draw a line between what can be executed in the DB (transformed to SQL clause) and what needs to be executed in memory (calling methods): var query = from user in user_rep where user.Login == "test" select user; var results = from user in query.ToLis

[nhusers] LazyLoadException with a custom collection type?

2009-10-13 Thread Ryan Lewis
I've implemented a custom set, resulting in 2 set classes (StockSet and PersistentStockSet, which derives from PersistentSet), both implementing the same interface IStockSet which is used in my class. I have created a StockSetUserType class which implements IUserCollectionType, and don't seem to h

[nhusers] Encapsulating a database design into my domain design that is compatible with NHibernate

2009-10-13 Thread Ryan Lewis
Okay, I hope this makes sense! I have an object Box which contains Items in it. The database design is such that only inserts are done on the Items table, and negative quantities are inserted to represent items being removed from the box. For example, if you put 10 items in the box, and remove 3

[nhusers] How to set default value of a property?

2009-10-13 Thread mynkow
Hi folks, I have a mapping files and I create my database from the mappings. The database has Default value field which I want to populate but NHib looks like does not support this. Can you help me how can I set default values of my properties? It is not necessary to do it in the database but in

[nhusers] NHibernate CreateSQLQuery Transaction Issu e…

2009-10-13 Thread Fuehner
I posted this on StackOverflow but, haven't received a response; please excuse my redundancy... I have a simple method that does... Session.CreateSQLQuery(syntax).List(); The issue is that when I execute this against a stored procedure that enlists a linked server connection I get the following

[nhusers] Update of Related / Relational Lists

2009-10-13 Thread sebi
Hi all, I have a question concerning Relations in NHibernate. To illustrate my question, here's an example: class Category { public int Id {get; set;} public string Name {get; set;} public IList Products{get; set;} } class Product { public int Id {get; set;} public string Name {g

[nhusers] How To Unlock Locked iPod

2009-10-13 Thread Ipod
How To Unlock Locked iPod http://bit.ly/hddpp http://bit.ly/hddpp How To Unlock Locked iPod    --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googleg

[nhusers] Re: How do you optimize a "contains" query???

2009-10-13 Thread Chris F
Thanks Oskar, That will require LINQ to NH, which I can't execute at the moment, but I plan on upgrading project dependencies in the near future so I'll give it a shot when I do. - Chris On Oct 9, 6:10 pm, Oskar Berggren wrote: > You seem to already have the manager loaded. By lazyload you pul

[nhusers] Re: Manually Indexing an Entity with NHibernate Search

2009-10-13 Thread Ricardo Peres
Found it: I had forgot the tx.Commit()! On Oct 12, 11:51 am, Ricardo Peres wrote: > Hi, > > I'm trying to manually index an entity, that is, not on the > PostInsert, PostDelete and PostUpdate events. > I have this code, which isn't doing anything: > > SearchFactoryImpl searchFactory = SearchFact

[nhusers] Re: Contextual Entities

2009-10-13 Thread Germán Schuager
Maybe this helps: http://blog.schuager.com/2009/02/contextual-data-using-nhibernate.html On Tue, Oct 13, 2009 at 8:04 AM, Tuna Toksoz wrote: > Oh no! > http://www.nhforge.org/doc/nh/en/index.html#objectstate-filters > > Tuna Toksöz > Eternal sunshine of the open source mind. > > http://devlicio.

[nhusers] Re: Password Hashing In Nhibernate

2009-10-13 Thread Jason Meckley
I think Ayende has a post on his blog about using an IUserType Implementation to store/retrieve hashed passwords. On Oct 13, 5:52 am, Oskar Berggren wrote: > One way to do it: > > My user has a property EncryptedPassword, which is usually a hash. > Probably public get, but private set. This is m

[nhusers] Re: Contextual Entities

2009-10-13 Thread Tuna Toksoz
Oh no! http://www.nhforge.org/doc/nh/en/index.html#objectstate-filters Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Tue, Oct 13, 2009 at 2:01 PM, José F. Romaniello wrote: > Hi, have look to thi

[nhusers] Re: Contextual Entities

2009-10-13 Thread José F . Romaniello
http://ayende.com/Blog/archive/2006/12/26/LocalizingNHibernateContextualParameters.aspx http://nhforge.org/wikis/howtonh/contextual-data-using-nhibernate-filters.aspx 2009/10/13 José F. Romaniello > Hi, have

[nhusers] Re: Contextual Entities

2009-10-13 Thread José F . Romaniello
Hi, have look to this topic: https://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/filters.html 2009/10/13 JamesSpibey > > Hi, > > I have a series of entities (for example Product entities) which have > properties/collections associated with them. However, some of the > collections

[nhusers] Contextual Entities

2009-10-13 Thread JamesSpibey
Hi, I have a series of entities (for example Product entities) which have properties/collections associated with them. However, some of the collections and properties on the entity may be context specific, i.e. prices which are specific to a given customer etc. Clearly this requires that when loa

[nhusers] Re: Password Hashing In Nhibernate

2009-10-13 Thread Oskar Berggren
One way to do it: My user has a property EncryptedPassword, which is usually a hash. Probably public get, but private set. This is mapped to DB. There is a separate function User.SetPassword(string cleartextPassword), which does the hashing and updates EncryptedPassword. Cleartext is not stored

[nhusers] SchemaUpdater

2009-10-13 Thread cws
Hi! After little sourcecode browsing in the latest 2.1.400 version I noticed that the schemaupdate doesn't alter a column which already exists? Would'nt that be a great feature to be able to sync existing db schema. But maybe there is some cons against such a approach. Is it teh same with schem

[nhusers] Password Hashing In Nhibernate

2009-10-13 Thread Maxus
Hi People, I have business reqirement to hash the users passwords for security. Whats the best way to achive that using nhibernate? Ideally I wanted to use the set method on the password property, but due to the use of DTOs this would be set everytime the entity went out and came back in which wo