I'm workingagainst the current trunk of nhibernate and nhibernate.linq.
Accessing my data via the standard query methods is fine, but when going via
the linq2hibernate provider, I'm getting a MappingException stating No
persister for: System.* where * is whatever the first System.* type that
Can anyone help me translate the following LINQ query into an nHibernate
Criteria clause?
from c in session.LinqContent
where c.WorkflowStage.Active
c.WorkflowStage.TransitionsFromHere.Any(x =
userContext.Identity.Roles.Contains(x.Role))
c.Owner.Id ==
would fetch both Base and Extedned
objects. Is there any way to restrict such behavior to fetch only Base
objects?
--
James Crowley
Managing Director
Developer Fusion - Connecting developers worldwide
Developer Fusion Ltd | 58 Sandringham Close | Enfield, EN1 3JH
mob: 07986 624128 web
hehe, thanks Fabio. You shall be the one and only Fabio from now on ;)
2009/3/16 Fabio Maulo fabioma...@gmail.com
2009/3/16 James Crowley james.crow...@gmail.com
I asked a similar question a few days ago.
Fabio Maulo said:
You can call me Fabio or Brutus ;)
--
Fabio Maulo
P.S. I
Anyone? Is this a bug with the current linq library? any workarounds
(ideally without having to resort to ICriteria)?
Thanks
2009/3/17 James Crowley james.crow...@gmail.com
Hey everyone,
Is it possible to perform deep where clauses using the current
NHibernate.Linq provider?
I've got
are the same.
Gustavo.
On Mon, Mar 30, 2009 at 1:58 PM, James Crowley james.crow...@gmail.comwrote:
Is there any way to set up composite validation? For instance, on a UI
object that has Password and PasswordConfirm, and they need to both
equal the same value?
I've seen this in other
sorry, the SomeProperty should be, say Password and PasswordConfirm...
with the matching on the groupname :)
2009/3/30 James Crowley james.crow...@gmail.com
Thanks Gustavo! Is there any way to make this a little more generic so you
can reuse the validator across different objects? Ideally I'd
Is there any way to set up composite validation? For instance, on a UI
object that has Password and PasswordConfirm, and they need to both
equal the same value?
I've seen this in other frameworks, but not nhibernate validator?
Thanks
James
--~--~-~--~~~---~--~~
I have a parent object which has a one to many relationship with an ISet of
child objects. When deleting a child object, *everything works fine*. But
when deleting a child object *and* adding a new child object in the same
transaction, the first child is not deleted.
I have the following in the
Should NH not detect the entity doesn't already exist in the database,
despite the fact it has an ID and insert it? Otherwise what else should we
be doing to allow for this?
Dan
--
http://danny-t.co.uk
--
http://danny-t.co.uk
--
James Crowley
Managing Director
Developer Fusion
the deletes first?
Thanks
James
2009/4/1 James Crowley james.crow...@gmail.com
I have a parent object which has a one to many relationship with an ISet of
child objects. When deleting a child object, *everything works fine*. But
when deleting a child object *and* adding a new child object in the same
this is doing a manual flush, but
usually I can refactor to have the actions be in different
transactions to order things correctly.
On Apr 1, 10:48 am, James Crowley james.crow...@gmail.com wrote:
Just realised the issue is to do with the unique constraint. NHibernate
seems to be trying
Although it's supported in standard LINQ - by which I presume you mean
LINQ to Objects, that's because all the objects are in-memory already. The
LINQ to SQL and Entity Framework providers don't support that kind of
analysis. Not a trivial thing to implement by any means...
2009/4/4 Arman
Can anyone suggest what I might be doing wrong here? I'm seeing SQL updates
to an entity (and its joined-subclass entities, as its part of a hirerachy),
when the only thing that's been changed is a child collection
I'm loading an entity from nHibernate. The entity is the root of an
inheritance
You might want to check your cascade options? If you want orphaned entities
to be removed, you need to set it to all-delete-orphans... but make sure you
understand the implcations of this.
See
:19 pm, James Crowley james.crow...@gmail.com wrote:
You might want to check your cascade options? If you want orphaned
entities
to be removed, you need to set it to all-delete-orphans... but make sure
you
understand the implcations of this.
Seehttp://
ayende.com/Blog/archive/2006/12/02
of entities being marked dirty
when they shouldn't.
http://nhforge.org/blogs/nhibernate/archive/2008/10/20/how-test-your-mappings-the-ghostbuster.aspx
On Mon, Apr 6, 2009 at 7:48 AM, Fabio Maulo fabioma...@gmail.com wrote:
mappings
2009/4/6 James Crowley james.crow...@gmail.com
Can
Maulo
--
James Crowley
Managing Director
Developer Fusion - Connecting developers worldwide
Developer Fusion Ltd | 58 Sandringham Close | Enfield, EN1 3JH
mob: 07986 624128 web: http://www.developerfusion.com/
--~--~-~--~~~---~--~~
You received this message
are nullable in your
entity class if they are nullable in the database. Otherwise null
values in the database will become 0 when loaded making the entity
dirty without you expecting it.
Craig
On Mon, Apr 6, 2009 at 10:17 PM, James Crowley james.crow...@gmail.com
wrote:
Can anyone suggest what I
,
//the transaction from 's' is put into Current.
// transaction 'a' is current, but aborted here
s.Complete ();
} // 'a' is already aborted, so is just removed at this point
Thanks in Advance!
--
James Crowley
Managing Director
Developer Fusion - Connecting developers
hey guys,
is there any way to get orderby working in conjunction with group by in the
Linq to SQL provider at the moment?
for instance:
from t in _queryService.ContentAttributeView
group t by t.Name
into g
orderby g.Count() descending
select g.Key;
fails with
[NullReferenceException: Object
placido.dine...@gmail.com
are you trying to do an orderby without a property name?!
Plácido Bisneto
.NET Developer
Blog: http://cidico.wordpress.com
OpenControls: http://opencontrols.codeplex.com
2009/6/21 James Crowley james.crow...@gmail.com
hey guys,
is there any way to get orderby
Is there any way to incorporate this into my query? Or will have to use a
stored proc? I'm already using LockMode.Upgrade but need the ReadPast hint
too.
Thanks!
James
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hi guys,
Delighted to see that the LINQ provider has made the 1.0 release. However,
am I correct in thinking it still doesn't support bitwise queries?
For instance, a query like this:
from x in _queryService.SomeObject
where (t.PromotionFlags promotionFlag) != promotionFlag
(where promotionFlag
Hey - can anyone give me an example of using a group by in LINQ through
nHibernate that actually works? I still can't get this working at all, even
something simple like this:
return (from a in _queryService.IndexedUrlAttributeView
group a by a.Name
into g
I'm seeing a strange issue whereby accessing a lazy-loaded property I only
get the Proxy object that has clearly *not* lazy loaded - it has all its
properties null, and just it's ID set. The row definitely exists in the
table. Another lazy loaded property (that references an entity already in
property/method?
http://broloco.blogspot.com/2008/01/nhibernate-identity-map-and-proxies.html
Or perhaps an 'internal' method that isn't marked as also protected?
http://nhjira.koah.net/browse/NH-1515
Just a thought.
Regards,
Richard
*From:* James Crowley james.crow...@gmail.com
Turns out because I was using InternalsVisibleTo (which I realise people
have mixed feelings over!) to expose internal members to the fluent
nhibernate mapper, this was causing issues. I switched the proxy provider
from LinFu to Castle and now its working fine.
James
2009/8/25 James Crowley
LinFu that
wasn't intercepting the property accessor).
Thanks for the update.
Richard
*From:* James Crowley james.crow...@gmail.com
*Sent:* Tuesday, August 25, 2009 2:29 PM
*To:* nhusers@googlegroups.com
*Subject:* [nhusers] Re: NHibernate proxy class not lazy loading itself?
Turns out
Hey,
I've noticed that if I write a query that puts a condition on a related
entity's primary key, such as
_queryService.IndexedUrl.Where(t=t.Author.Id == 29)
then nHibernate will join on the Author table, even though it only actually
needs to specify AuthorId on the IndexedUrl table as we're
the best
James
2009/8/31 Fabio Maulo fabioma...@gmail.com
from Something t where t.Author.id = 29
2009/8/31 James Crowley james.crow...@gmail.com
Hey,
I've noticed that if I write a query that puts a condition on a related
entity's primary key, such as
_queryService.IndexedUrl.Where(t
NHibernate.
How can I do this?
Thanks,
Joey
--
James Crowley
Managing Director
Developer Fusion - Connecting developers worldwide
Developer Fusion Ltd | 58 Sandringham Close | Enfield, EN1 3JH
mob: 07986 624128 web: http://www.developerfusion.com
I've just tried making a referenced entity on my domain object set to
be fetched with a join (rather than lazy loaded). However, now when I
try to access another collection on the same domain object (that is
lazy loaded) I get a LazyInitializationException telling me no
session or session was
hey guys,
I've been using a solution described here:
http://stackoverflow.com/questions/706673/forcing-nhibernate-to-cascade-delete-before-inserts
in order to force elements in a collection to be deleted before the
inserts (there's a unique constraint in place, and the new inserts
fail if they
Hey guys,
Is there any way to enlist an existing IDbTransaction created elsewhere
(rather than starting a new one?). Alternatively, is it possible to get a
reference to an IDbTransaction from an existing nHibernate transaction to
use elsewhere? (basically need to execute some non-nHibernate db
session.Transaction.Enlist(idbcommand)
/Oskar
2009/12/16 James Crowley james.crow...@gmail.com:
Hey guys,
Is there any way to enlist an existing IDbTransaction created elsewhere
(rather than starting a new one?). Alternatively, is it possible to get a
reference to an IDbTransaction
anyone? :)
2009/12/16 James Crowley james.crow...@gmail.com
Hi Oskar - thanks for the response. Unfortunately I don't have a reference
to IDbCommand - just the transaction.
what I have is a LINQ to SQL query layer that needs to execute in the same
transaction as operations on our domain
Thanks Fabio - that's given me a load more stuff to go and read!
2009/12/17 Fabio Maulo fabioma...@gmail.com
Ambient Transaction
2009/12/17 James Crowley james.crow...@gmail.com
anyone? :)
2009/12/16 James Crowley james.crow...@gmail.com
Hi Oskar - thanks for the response
Does anyone know what's happened to www.hornget.net ? Seems to have been
down for a few days at least?
Thanks
James
--
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
...@gmail.com wrote:
Hi
I followed the above query but i gor following error
The value System.Object[] is not of type Customer and cannot be
used in this generic collection.
Parameter name: value
waruni
On Mar 16, 1:53 pm, James Crowley james.crow...@gmail.com wrote:
Hi there,
You
Ah, great - thank you!
On 16 March 2010 12:18, Fabio Maulo fabioma...@gmail.com wrote:
extension method
2010/3/16 Paco Wensveen pac...@gmail.com
It's available: queryable.Fetch(entity = entity.Property)
On Tue, Mar 16, 2010 at 9:34 AM, James Crowley james.crow...@gmail.com
wrote:
hey
Hi guys,
I'm doing a bit more work against the new LINQ provider, but am I right in
thinking there's not yet any Group By support? I keep hitting
[NotImplementedException: The method or operation is not implemented.]
Hi guys,
I keep getting IndexOutOfRangeException's on the current trunk (with code
that worked fine in NH 2.1) because it's looking for the primary key in the
resultset with square brackets round the column name ([QueuedTaskId]
instead of QueuedTaskId) - I've checked and the exception doesn't
); // where 000 is a valid ID of a
QueuedJob entity
works fine.
Fabio - if you need any more info to reproduce just let me know :)
On 24 March 2010 12:19, Robert Rudduck rob...@rpowered.net wrote:
The ` quotes on the column name are probably doing it.
On Wed, Mar 24, 2010 at 6:38 AM, James Crowley
Is it possible? Most of the docs seem to suggest not, but there also seem to
be some patches (for the Java version of hibernate) floating around like
here:
Hi guys,
I'm hoping to do a query like this:
select content.Id
from {0}View content
join content.Tags tags
where (content.Id != :itemId) and tags.Name in (:tags)
group by content
having count(tags) 0
order by count(tags) desc, content.PublishedDate desc
I don't care whether it's HQL, Linq,
I had the group by because you can't otherwise include the having and
order by clauses over the tags child collection? (unless I'm missing
something here!!)
On 30 March 2010 16:05, kor korkl...@yahoo.it wrote:
why do you need to group by content?,
do you mean samething as 'select distict
Hi guys,
Are you aware of a threading issue
within QueryParameters.PrepareParameterTypes? I've got two threads
(operating over different sessions) that, when run starting from the same
execution point at the start of the PrepareParameterTypes method. All works
fine when the other thread is
Hi guys,
I've searched around for this but with no luck. Is there any way for me to
generate an nHibernate configuration file from a Configuration instance
(that has been already configured by some external code?). Just looking for
an easy way to mimic this external code with a static XML file...
Rahien aye...@ayende.com wrote:
There _was_ a problem there, IIRC.
I am pretty sure that we fix that.
Are you using the latest? Can you provide a failing test?
On Fri, Apr 23, 2010 at 3:09 PM, James Crowley james.crow...@gmail.comwrote:
Hi guys,
Are you aware of a threading issue
within
Anyone managed to try this? Should just be a case of opening the proj and
running the test. Would be good to know I'm not going crazy.
Thanks :)
James
On 4 May 2010 21:24, James Crowley james.crow...@gmail.com wrote:
Hi guys,
I've posted a ZIP with a unit test up here:
http
email to
nhusers+unsubscr...@googlegroups.comnhusers%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.
--
---
James Crowley
CEO, developerFusion - the global developer community -
http://www.developerfusion.com/
CTO, TechEye
PM, James Crowley james.crow...@gmail.com
wrote:
I too would be interested to get people's suggestions on how best to do
this? You can't seem to get the AliasToBean transformer to deal with the
fact we want to set properties on a child property of the DTO either?
Would appreciate any
I'm intermittently (again!) seeing this error on the trunk:
System.InvalidCastException
Unable to cast object of type 'NHibernate.Impl.ExpandedQueryExpression' to
type 'NHibernate.Linq.NhLinqExpression'.
at NHibernate.Linq.TypeHelperExtensionMethods.As[T](Object source) in
Hi guys,
I've got a ICompositeUserType implementation that works great when
saving/persisting entities... but it doesn't seem to work when using it as a
parameter in a query? Instead, it seems to try and binary serialize the type
instead and pass that in as the value to the query?
Any pointers
I should add - the type itself doesn't inherit ICompositeUserType... but the
implementation to use is specified in the mapping.
On 7 June 2010 13:34, James Crowley james.crow...@gmail.com wrote:
Hi guys,
I've got a ICompositeUserType implementation that works great when
saving/persisting
...@googlegroups.com.
To unsubscribe from this group, send email to
nhusers+unsubscr...@googlegroups.comnhusers%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.
--
---
James Crowley
CEO, developerFusion - the global developer
the date of final release, I will inform the team ASAP.
Thanks.
On Mon, Jul 26, 2010 at 11:24 AM, James Crowley
james.crow...@gmail.comwrote:
Guys - just covering this release on Developer Fusion -
http://www.developerfusion.com/news/84984/nhibernate-3-alpha-1-available/.
Was hoping to check
Hi guys,
I've got three unit tests, using Criteria, QueryOver and Linq respectively
(see below) - the first two passes fine, but the last one fails with a No
persister for: System.Uri error.
The mapping on the column is:
property name=WebSite
David, there's a JIRA on this issue here:
http://216.121.112.228/browse/NH-2234
On 16 August 2010 23:03, Diego Mijelshon di...@mijelshon.com.ar wrote:
I don't think so.
Diego
On Mon, Aug 16, 2010 at 11:08, David Pfeffer byte...@bytenik.com wrote:
Hi all,
Is there a way to specify
I've hit the same issue - did you find a solution? If you find a way while
still using LINQ (rather than having to bring in direct NH dependencies on
HQL/QueryOver) please do post back here!
Not sure if there's a JIRA bug for this stuff, but would seem like a common
requirement?
Thanks!
James
In case anyone else comes across this and are looking for a short-term fix,
I just ended up just chaining several Where expressions together instead
- so
var item = something.Where(t=t.xx)
if (condition)
item = item.Where(t=t.yy)
and so on.
On 7 January 2011 11:46, José F. Romaniello
Hi guys,
If I'm just passing an IQueryableT reference, is there any way to take
advantage of the first-level cache when fetching entities by id? Or is it
still the case that I'd need to go via the Get/Load methods on the ISession
interface?
Many thanks
James
--
You received this message
Hi folks,
Is there a way to specify additional conditions to outer joins (rather than
them appearing in the WHERE clause) ?
I need some extra conditions on the outer join-ed table, but adding them to
the WHERE clause does not get the correct behaviour (see
Sorry - ignore this! Just spotted an identical post from just a few days ago
with the answer.
CreateAlias(string associationPath, string alias, JoinType joinType,
ICriterion withClause)
Thanks
On 23 March 2011 19:43, James Crowley james.crow...@gmail.com wrote:
Hi folks,
Is there a way
65 matches
Mail list logo