You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(110) |
Nov
(296) |
Dec
(107) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(212) |
Feb
(263) |
Mar
(161) |
Apr
(183) |
May
(183) |
Jun
(75) |
Jul
(106) |
Aug
(88) |
Sep
(227) |
Oct
(143) |
Nov
(154) |
Dec
(53) |
2008 |
Jan
(77) |
Feb
|
Mar
|
Apr
(6) |
May
(103) |
Jun
(296) |
Jul
(54) |
Aug
|
Sep
(379) |
Oct
(283) |
Nov
(224) |
Dec
(214) |
2009 |
Jan
(129) |
Feb
(257) |
Mar
(136) |
Apr
(12) |
May
(329) |
Jun
(434) |
Jul
(375) |
Aug
(171) |
Sep
|
Oct
|
Nov
|
Dec
(54) |
2010 |
Jan
(198) |
Feb
(76) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(62) |
Jul
(210) |
Aug
(447) |
Sep
(330) |
Oct
(257) |
Nov
(133) |
Dec
(453) |
2011 |
Jan
(240) |
Feb
(128) |
Mar
(442) |
Apr
(320) |
May
(428) |
Jun
(141) |
Jul
(13) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 22:59:47
|
[ http://216.121.112.228/browse/NH-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-1953: ---------------------------- Issue Type: Improvement (was: Bug) > Future<> doesn't work on CreateFilter > ------------------------------------- > > Key: NH-1953 > URL: http://216.121.112.228/browse/NH-1953 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 2.1.0.GA > Reporter: Marko Podgorsek > > I have a class: > public class User > { > public virtual IList<Tag> Tags { get; protected set; } > } > public class Tag .... //not important > Mapping for User -- the Tags part: > <bag lazy="true" name="Tags" table="USER_TAG"> > <key> > <column name="ID_USER" /> > </key> > <many-to-many class="BeriMe.Biz.Domain.Tag, BeriMe.Biz, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> > <column name="ID_TAG" /> > </many-to-many> > </bag> > If I do this: > User u = db.Get<User>(5); > var t = db.CreateFilter(u.Tags, "") > .SetFirstResult(4) > .SetMaxResults(3) > .Future<Tag>(); //If I say List<Tag>() it works OK. > foreach (var x in t) { } //crash > Error: > NHibernate.Hql.Ast.ANTLR.QuerySyntaxException: Exception of type 'Antlr.Runtime.MismatchedTreeNodeException' was thrown. []. > Error from log: > ERROR NHibernate.Hql.Parser - MismatchedTreeNodeException(3!=2) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 22:44:49
|
[ http://216.121.112.228/browse/NH-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-1921. --------------------------- Resolution: Won't Fix Problem solved by mapping-by-code. > Possibility to improve hbm.xml Mapping file configuration > --------------------------------------------------------- > > Key: NH-1921 > URL: http://216.121.112.228/browse/NH-1921 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 2.0.1.GA > Reporter: BNReddy > Priority: Minor > Attachments: Child.xml, Parent.hbm.xml > > > My project is having a lot of hbm.xml files in which most of the hbm.xml files are having same component configuration. > Problem is if add/remove a member which should be reflected under database leads to update all hbm.xml files where it is configured. > I can make it as a separate entity and I can proceed. Other than this solution, is there any other solution. > If not, why can't NH allow to use <xi:include href="filename"/> concept. Providing separate xml file for component and ref the xml file where it is required. > Future changes requires to change only one xml file which will reduce all refered xml files update. > Please find the attached sample xml files. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 22:40:49
|
[ http://216.121.112.228/browse/NH-928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-928. -------------------------- Resolution: Obsolete Criteria has projections > Add equivalent to "select entity" to criteria API > ------------------------------------------------- > > Key: NH-928 > URL: http://216.121.112.228/browse/NH-928 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 1.2.0.CR1 > Reporter: Aaron Jensen > Priority: Minor > > Currently there's no way to do select child from parent.child in the criteria API. You can do an AliasToEntityMap transform and just grab the children, but that's probably a bit more heavy than the hql alternative. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 22:35:48
|
[ http://216.121.112.228/browse/NH-2368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2368. --------------------------- Resolution: Not an Issue The query does not specify the cache usage (see method Cacheable()) > Cannot cache query and data using LINQ > -------------------------------------- > > Key: NH-2368 > URL: http://216.121.112.228/browse/NH-2368 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.Alpha3 > Reporter: Matteo Migliore > Priority: Major > Attachments: NHibernate.Caching.Test.zip > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 22:27:55
|
[ http://216.121.112.228/browse/NH-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21025#action_21025 ] Fabio Maulo commented on NH-2182: --------------------------------- Some months, no test. > NHibernate.Event.Default.AbstractFlushingEventListener.AbstractFlushingEventListener() can raise Exception when log is DEBUG > ---------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2182 > URL: http://216.121.112.228/browse/NH-2182 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Xavier Le Galles > Priority: Major > > Here is what i get when Log4net is in DEBUG (otherwise there is no exception): > Collection was modified; enumeration operation may not execute. > at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) > at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext() > at NHibernate.Impl.Printer.ToString(IEnumerator enumerator, EntityMode entityMode) > at NHibernate.Event.Default.AbstractFlushingEventListener.FlushEverythingToExecutions(FlushEvent event) > at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) > at NHibernate.Impl.SessionImpl.Flush() > at NHibernate.Transaction.AdoTransaction.Commit() > I have checked this method and i found this: > - at the very beginning of the method, you take a reference to IPersistenceContext persistenceContext = session.PersistenceContext > - at the end of the method, if log is in DEBUG: if (log.get_IsDebugEnabled()) > - you try to log the context: new Printer(session.Factory).ToString((IEnumerator) persistenceContext.EntitiesByKey.Values.GetEnumerator(), session.EntityMode); > I have watched the PersistenceContext and yes, it is modified between the beginning and the end of this method: at the beginning, there are 2 entities with no values and at the end 4. Each entity is "doubled" (same ID): one entry has no value, the other one has one. It could be related to the way we calculate the GetHashCode() ... > If you need more details, i could investigate. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 22:20:51
|
[ http://216.121.112.228/browse/NH-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2100. --------------------------- Resolution: Obsolete Even without the Refresh (that mean another hit to DB) the test does not fail in NH3.2 > Entity version updated when no update necessary. > ------------------------------------------------ > > Key: NH-2100 > URL: http://216.121.112.228/browse/NH-2100 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Luke Bakken > Priority: Major > Attachments: NH.zip, NH.zip > > > I have a test case with two classes in a many-to-many relationship. Tests One and Two show failing cases where I would expect the version to not change, test Three shows a case where opening an entirely different session has the expected results. > Stepping through the NH source I can see that in the failing cases the PersistentBag associated with Class2List in Class1 does not have a populated Snapshot - this is why NH forces the collection to be dirty when the transaction ends. I would expect that adding items to a collection, calling Save() and then Commit() would update the Snapshot collection correctly in this case so a second Session is not necessary. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 21:21:52
|
[ http://216.121.112.228/browse/NH-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-1965. --------------------------- Resolution: Obsolete The test is available in our sources; it does not fail in NH3.2 > CLONE -Lock(obj, LockMode.None) not working when there is collection > -------------------------------------------------------------------- > > Key: NH-1965 > URL: http://216.121.112.228/browse/NH-1965 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 2.1.0.GA > Reporter: Offir > Priority: Major > > As we all know, there are two means of re-attach a detached object: 1) sess.Update(obj) and 2) sess.Lock(c, LockMode.None); > In 1.2.0 Alpha1, the second meanning does not work. If there is a collection in the entity, Lock() will throw an exception (but now error was found in the log file). > Here are the code and the mapping file, which can also be found in the attachment. > ////////ReAttachTest.cs//////////// > [TestFixture] > public class ReAttachTest { > [Test] > public void ReAttachCatTest() { > Configuration cfg = new Configuration(); > cfg.AddAssembly("NHSessTest"); > ISessionFactory fct = cfg.BuildSessionFactory(); > ISession sess = fct.OpenSession(); > Cat c = new Cat(); > sess.Save(c); > sess.Clear(); > > sess.Update(c); //Update() works fine > > sess.Clear(); > > sess.Lock(c, LockMode.None); //Exception throw here > > sess.Close(); > } > } > /////Exception info///////////////////// > NHibernate.HibernateException: reassociated object has dirty collection reference > at NHibernate.Impl.OnLockVisitor.ProcessCollection(Object collection, CollectionType type) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\OnLockVisitor.cs:line 58 > at NHibernate.Impl.AbstractVisitor.ProcessValue(Object value, IType type) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\AbstractVisitor.cs:line 57 > at NHibernate.Impl.AbstractVisitor.ProcessValues(Object[] values, IType[] types) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\AbstractVisitor.cs:line 30 > at NHibernate.Impl.AbstractVisitor.Process(Object obj, IEntityPersister persister) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\AbstractVisitor.cs:line 82 > at NHibernate.Impl.SessionImpl.Reassociate(Object obj, Object id, IEntityPersister persister) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 1983 > at NHibernate.Impl.SessionImpl.Lock(Object obj, LockMode lockMode) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2025 > at NHSessTest.Tests.Work.ReAttachTest.ReAttachCatTest() in ReAttachTest.cs:line 23 > ///////////Cat.cs/////////// > using System; > using System.Collections; > using System.Text; > namespace NHSessTest{ > public class Cat{ > private int id; > private IList children = new ArrayList(); > //Note: I initialized the collection here, if removed, Lock will work. > public int Id{ > get { return id; } > set { id = value; } > } > public IList Children { > get { return children; } > set { children = value; } > } > } > } > ///////////Cat.hbm.xml///////// > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" schema="dbo" assembly="NHSessTest" default-lazy="false"> > <class name="NHSessTest.Cat" > > <id name="Id" type="Int32" unsaved-value="0" > > <generator class="identity" /> > </id> > > <bag name="Children" cascade="all-delete-orphan" lazy="true"> > <key column="parentId" /> > <one-to-many class="NHSessTest.Cat" /> > </bag> > </class> > </hibernate-mapping> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:58:24
|
[ http://216.121.112.228/browse/NH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2200. --------------------------- Resolution: Obsolete > SchemaExport: include foreign keys in CREATE TABLE (for SQLite) > --------------------------------------------------------------- > > Key: NH-2200 > URL: http://216.121.112.228/browse/NH-2200 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 2.1.2.GA > Reporter: Matthew Gabeler-Lee > Assignee: Patrick Earl > > Since newer versions of SQLite support foreign key enforcement, it would be nice if the schema export functionality in NHibernate could generate foreign key clauses when working with the SQLite dialect. > Right now what's stopping this from being a trivial change to the SQLiteDialect class is that NHibernate only creates foreign keys with an ALTER TABLE statement, and SQLite doesn't support that. If NHibernate supported including the foreign keys in the CREATE TABLE statement, then SQLite's foreign key support could be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:58:04
|
[ http://216.121.112.228/browse/NH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reopened NH-2200: ----------------------------- Assignee: Patrick Earl > SchemaExport: include foreign keys in CREATE TABLE (for SQLite) > --------------------------------------------------------------- > > Key: NH-2200 > URL: http://216.121.112.228/browse/NH-2200 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 2.1.2.GA > Reporter: Matthew Gabeler-Lee > Assignee: Patrick Earl > > Since newer versions of SQLite support foreign key enforcement, it would be nice if the schema export functionality in NHibernate could generate foreign key clauses when working with the SQLite dialect. > Right now what's stopping this from being a trivial change to the SQLiteDialect class is that NHibernate only creates foreign keys with an ALTER TABLE statement, and SQLite doesn't support that. If NHibernate supported including the foreign keys in the CREATE TABLE statement, then SQLite's foreign key support could be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:57:49
|
[ http://216.121.112.228/browse/NH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2200. --------------------------- Resolution: Obsolete Fixed in revision 5543 by Patrick > SchemaExport: include foreign keys in CREATE TABLE (for SQLite) > --------------------------------------------------------------- > > Key: NH-2200 > URL: http://216.121.112.228/browse/NH-2200 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 2.1.2.GA > Reporter: Matthew Gabeler-Lee > > Since newer versions of SQLite support foreign key enforcement, it would be nice if the schema export functionality in NHibernate could generate foreign key clauses when working with the SQLite dialect. > Right now what's stopping this from being a trivial change to the SQLiteDialect class is that NHibernate only creates foreign keys with an ALTER TABLE statement, and SQLite doesn't support that. If NHibernate supported including the foreign keys in the CREATE TABLE statement, then SQLite's foreign key support could be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:40:49
|
[ http://216.121.112.228/browse/NH-2576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2576. --------------------------- Resolution: Obsolete Was fixed fixing the linked issue. > QueryOver: TransformUsing and Cacheable not working together > ------------------------------------------------------------ > > Key: NH-2576 > URL: http://216.121.112.228/browse/NH-2576 > Project: NHibernate > Issue Type: Bug > Components: QueryOver > Affects Versions: 3.0.0.GA > Reporter: Chris Haines > Priority: Major > > Please see this thread: http://groups.google.com/group/nhusers/browse_thread/thread/22f0dd728b951b4 > TransformUsing works fine on it's own, as does Cacheable, but using the two together blows up with this error: > Unable to cast object of type '...' to type 'System.Object[]'. > I have not tested it but apparently it's not working with ICriteria either. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:36:49
|
[ http://216.121.112.228/browse/NH-1774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-1774. --------------------------- Resolution: Obsolete > [config] Provide shorthand for default proxyfactory.factory_class values > ------------------------------------------------------------------------ > > Key: NH-1774 > URL: http://216.121.112.228/browse/NH-1774 > Project: NHibernate > Issue Type: Improvement > Components: Toolset > Affects Versions: 2.1.0.Alpha1 > Reporter: Krzysztof Koźmic > > There should be a shorthand values for default three proxy factory factories so that instead of > <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory,NHibernate.ByteCode.Castle</property> > A user has to type > <property name="proxyfactory.factory_class">castle</property> > or > <property name="proxyfactory.factory_class">spring</property> > or > <property name="proxyfactory.factory_class">linfu</property> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:32:56
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21020#action_21020 ] Fabio Maulo commented on NH-2697: --------------------------------- Perhaps it is not so important. If it were important you would send us a test to recreate the issue instead ask us to jump here and there to see a mapping, try various configuration and only then try a fix. > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 15:59:47
|
[ http://216.121.112.228/browse/NH-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2684. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Alpha3 > More simple way to add NamedQueries by-code > ------------------------------------------- > > Key: NH-2684 > URL: http://216.121.112.228/browse/NH-2684 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Fabio Maulo > Fix For: 3.2.0Alpha3 > > > Even if possible since long time the addition of namedqueries by code implies an advanced knowledge by the user. > We should add a builder, through a mew method of the Configuration, to add a named-query assigning default values giving the ability, to the user, to specify only he really need. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jenar (JIRA) <nh...@gm...> - 2011-05-09 14:33:58
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21019#action_21019 ] Jenar commented on NH-2697: --------------------------- It would be better if you could create some small mapping and test it as you have suggested in your second comment: "Ok I'll create a little mapping with just two properties..." I have tried with indexed params "is=?" but it throws exception also. So problem is with parsing params in HQL if "entity-names" are used. Thank you very much for your time, it is importand issue for us. > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 14:20:55
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21018#action_21018 ] Fabio Maulo commented on NH-2697: --------------------------------- To both, In your opinion, what we should do if we copy and paste that mapping to create a test and then we discover that we can't use it because we don't have some needed classes ? Should we invent those classes ? Or can we ignore it ? > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 14:14:46
|
[ http://216.121.112.228/browse/NH-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2510. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Alpha3 > Lazy-loading doesn't work with cache > ------------------------------------ > > Key: NH-2510 > URL: http://216.121.112.228/browse/NH-2510 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sławomir Rosiek > Priority: Minor > Fix For: 3.2.0Alpha3 > > Attachments: NH2510-Fixture.patch > > > If I set caching in entity which has lazy property I have the following exception: > System.InvalidCastException: Unable to cast object of type 'System.Object' to type 'System.Byte[]'. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jenar (JIRA) <nh...@gm...> - 2011-05-09 05:51:54
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21017#action_21017 ] Jenar commented on NH-2697: --------------------------- Yes we have tried this code and mapping. First we had only one mapping for "ArticleItem" and in developing process we had extendet it to "Article" and "Activity_Article". So after that we got exception "..Parameter ID does not exist as a named parameter in" with almost the same HQL. (Only class name was changed to Entity-name in it). > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Sławomir R. (J. <nh...@gm...> - 2011-05-07 17:40:48
|
[ http://216.121.112.228/browse/NH-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21016#action_21016 ] Sławomir Rosiek commented on NH-2510: ------------------------------------- Domain: public class GalleryItem { public virtual int Id { get; set; } public virtual string FileName { get; set; } public virtual byte[] Data { get; set; } } XML Mapping: <class name="GalleryItem"> <cache usage="read-only" /> <id name="Id"> <generator class="native" /> </id> <property name="FileName" /> <property name="Data" lazy="true" /> </class> > Lazy-loading doesn't work with cache > ------------------------------------ > > Key: NH-2510 > URL: http://216.121.112.228/browse/NH-2510 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sławomir Rosiek > Priority: Minor > Attachments: NH2510-Fixture.patch > > > If I set caching in entity which has lazy property I have the following exception: > System.InvalidCastException: Unable to cast object of type 'System.Object' to type 'System.Byte[]'. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-07 17:14:50
|
[ http://216.121.112.228/browse/NH-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21015#action_21015 ] Fabio Maulo commented on NH-2510: --------------------------------- @Slawomir same domain same mapping ? > Lazy-loading doesn't work with cache > ------------------------------------ > > Key: NH-2510 > URL: http://216.121.112.228/browse/NH-2510 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sławomir Rosiek > Priority: Minor > Attachments: NH2510-Fixture.patch > > > If I set caching in entity which has lazy property I have the following exception: > System.InvalidCastException: Unable to cast object of type 'System.Object' to type 'System.Byte[]'. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Lars S. (JIRA) <nh...@gm...> - 2011-05-07 11:37:45
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21014#action_21014 ] Lars Schneider commented on NH-2697: ------------------------------------ As posted in the hibernate forum we tried and always got the exception as stated by jenar. But we can't see anything wrong, so we assume that there might be a bug in nhibernate. I now just wanted to ask if you have looked at the posting in the forum withe the complete mapping file? And if the file and also the used HQL query code seems to be alright to you, so that this might really be a bug. Or do you see anything wrong in the code? > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Sławomir R. (J. <nh...@gm...> - 2011-05-07 11:12:47
|
[ http://216.121.112.228/browse/NH-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21013#action_21013 ] Sławomir Rosiek commented on NH-2510: ------------------------------------- My case is similar. The only difference is that I have cache declaration (with usage equal "read-only") in class mapping. Thanks. > Lazy-loading doesn't work with cache > ------------------------------------ > > Key: NH-2510 > URL: http://216.121.112.228/browse/NH-2510 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sławomir Rosiek > Priority: Minor > Attachments: NH2510-Fixture.patch > > > If I set caching in entity which has lazy property I have the following exception: > System.InvalidCastException: Unable to cast object of type 'System.Object' to type 'System.Byte[]'. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Phillip C. (JIRA) <nh...@gm...> - 2011-05-07 10:54:39
|
[ http://216.121.112.228/browse/NH-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phillip Conrad updated NH-2696: ------------------------------- Attachment: exception.txt > ReadOnly without lazyInitializer.IsReadOnlySettingAvailable in TwoPhaseLoad.cs > ------------------------------------------------------------------------------ > > Key: NH-2696 > URL: http://216.121.112.228/browse/NH-2696 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0, 3.2.0Alpha1, 3.2.0Alpha2 > Reporter: Phillip Conrad > Priority: Minor > Attachments: exception.txt, nh-bug-scenario.png, TwoPhaseLoad.fix.cs > > > Bug-Scenario: > - 2 component-types of the same datatype in one union-subclass > - lazy="true" in uni-subclass definition > - proxyfactory.factory_class: NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle > - NH 3.1.0GA > The "((INHibernateProxy) proxy).HibernateLazyInitializer.ReadOnly"-Property throw a exception, because > the session in the lazyInitializer is null. > Exception: "Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session." > A similar bug was reported here: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5871 > The same fix will remove this error in nhibernate. > The solution is to use "lazyInitializer.IsReadOnlySettingAvailable". > I have posted the same bug here: http://groups.google.com/group/nhusers/browse_thread/thread/d223e79b81a7be41 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Alexey G. (JIRA) <nh...@gm...> - 2011-05-07 06:07:55
|
[ http://216.121.112.228/browse/NH-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21012#action_21012 ] Alexey Gorbach commented on NH-2510: ------------------------------------ According to given information - yes. Exception is the same, and it is thrown only when cache is turned on and when entity has lazy-load byte[] field. Thanks. P.S. Have you applyied patch ? Is everything OK with it ? Should I change something, if I post another test for another bug ? > Lazy-loading doesn't work with cache > ------------------------------------ > > Key: NH-2510 > URL: http://216.121.112.228/browse/NH-2510 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sławomir Rosiek > Priority: Minor > Attachments: NH2510-Fixture.patch > > > If I set caching in entity which has lazy property I have the following exception: > System.InvalidCastException: Unable to cast object of type 'System.Object' to type 'System.Byte[]'. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-06 22:16:47
|
[ http://216.121.112.228/browse/NH-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21011#action_21011 ] Fabio Maulo commented on NH-2510: --------------------------------- Alexey, are you 100% that the case is the same ? Sławomir can you check if your case is the same ? Thanks. > Lazy-loading doesn't work with cache > ------------------------------------ > > Key: NH-2510 > URL: http://216.121.112.228/browse/NH-2510 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sławomir Rosiek > Priority: Minor > Attachments: NH2510-Fixture.patch > > > If I set caching in entity which has lazy property I have the following exception: > System.InvalidCastException: Unable to cast object of type 'System.Object' to type 'System.Byte[]'. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |