Intereting... I know this is sort of the wrong place to ask, but how
do I do this in Fluent NH? I've tried .ReadOnly() but I then get an
error message about there not being a setter... I've also tried.
Access.various but there doesn't seem to be one called ReadOnly...
any ideas?
On Feb 17, 11:29
I did find a errors in the NHibernate source.
In 'AbstractNullnessCheckNode.cs' and 'BinaryLogicOperatorNode.cs'
files there are these lines:
String[] splits = StringHelper.Split( , , nodeText );
If think the author wanted to make a sting like this value1, value2
to be split in 2 parts but the
Thank you for an answer Fabio.
I've just resolved my problem. In the mean time I realized, that the
entity load and entity session has been done in two seperate sessions.
After entities load the session has been cleared and disposed. After
that some operations on the entities collection has been
No, I don't wanna do this. I want to get the whole GRAPH of an entity.
You know, the class structure, relations to other entities. I am not
talking about data but schema of .NET types. I don't know how to
describe this with other words. If you dont know what is a graph check
wikipedia
On Feb 17,
hi, use jira to send bug and/or bugfix at http://jira.nhforge.org
(it's more easy to manage them with jira)
note: in this days the server is down for maintenance, so wait same
days when it will be up to send your bug and bugfix
--
You received this message because you are subscribed to the
I know that there's no difference in .net, but I wanted to make sure
there's no difference in NH as well.
Thank you guys!
--
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
In any case, you should use a nullable enum property instead of a NONE
value.
My impression is that you are designing your domain based on display
concerns.
Diego
On Thu, Feb 18, 2010 at 00:46, Fabio Maulo fabioma...@gmail.com wrote:
IUserType if you have time to implements it otherwise
I'm getting the following error with a named query, on Session start.
NHibernate.QueryException: No column name found for property [Id] for
alias [hp] [select iteminhier0_.Id as {h.Id},
itemlookup1_.Id as {i.Id},
itemlookup2_.Id as {p.Id},
I'm just thinking* it might be easier to do this with HQL
Diego
*: I didn't try
On Wed, Feb 17, 2010 at 15:03, Scott White scott.w.wh...@gmail.com wrote:
Using version 2.1.0.4
Since the following code clears the projection before adding the
rowcount as a projection if the target query
Next time, it would be better if you stated what the bug is, the context,
etc.
Anyway, I ran it and it tries to use the constant string in an incorrect
way, so that's probably unsupported in 2.x.
Have you tried with 3.x (trunk)?
Diego
On Wed, Feb 17, 2010 at 06:13, Rikard Pavelic
Copying answer to Sravan, I didn't see he replied to me privately
-- Forwarded message --
Date: Wed, Feb 17, 2010 at 21:41
To: sravan sravan.surabhi.ku...@gmail.com
Well, that's the problem with sql-insert
If it hurts when you do that, stop doing it
Go with the intermediate
Hello,
I'm trying to use the NHIbernate SchemaUpdater
(NHibernate .Tool .hbm2ddl .SchemaUpdate). If I call
schemaUpdate.execute(true,true)
the function will block the program for appr. 5 minutes, then output
sql-commands but doesn't apply them to the database. and the sql-
commands does update
GUIDs themselves have a fairly low chance of reptition although it does
happen. Unfortunately the Guid.Comb algorithm breaks down quickly when is
distributed situations such as the one you are describing (read the comments
from here:
Do you have the connection string right? Sounds like NH might not be looking
in the right place, so it thinks all the tables are new...
On Thu, Feb 18, 2010 at 7:41 AM, Marco
irresponsible.philosop...@googlemail.com wrote:
Hello,
I'm trying to use the NHIbernate SchemaUpdater
(NHibernate
Dave,
Nice work!
Contributions are always welcome in healthy open source communities.
My suggestion is that you host the project on Google Code or SourceForge (I
prefer the former), with a reasonable license (NH itself uses LGPL). Good
luck!
Diego
2010/2/17 newman.de newman...@gmail.com
If you just want to do this, you really don't need NHibernate. Just do a
traversal of the properties using reflection.
Pusedo code would looks something like:
create a queue
enqueue the type of the root entityType
while the queue is not empty
- get all the properties and their property type
-
Unfortunatly there were no results.
It runs for 5 minutes, outputs everthing to the console and applies
nothing.
On 18 Feb., 15:22, Marco irresponsible.philosop...@googlemail.com
wrote:
I think the connection string is right, but maybe I have to add
database to it - actually
I don't need it
Well the console part is because you have the first paramater (script) set
to true. Not sure why it isnt outputting though. Does SchemaExport work to
create the schema initially with that same connection string?
On Thu, Feb 18, 2010 at 8:47 AM, Marco
irresponsible.philosop...@googlemail.com
There is another option
http://fabiomaulo.blogspot.com/2009/02/nh210-new-generators.html
http://fabiomaulo.blogspot.com/2009/02/nh210-new-generators.htmlsee
: guid.native
2010/2/18 Robert Rudduck rob...@rpowered.net
GUIDs themselves have a fairly low chance of reptition although it does
You could set the access to use a private field and not put a setter on the
property. ReadOnly means that any update wont be written out, but it still
requires a setter of some sort so NHibernate can initialize it.
On Thu, Feb 18, 2010 at 2:12 AM, Alex McMahon fluxmu...@gmail.com wrote:
It actually IS outputting, but it does not apply that to the database,
sorry if
I didn't get myself clear enough.
If I try with SchemaExport it works fine, with the same connection
string. What
confuses me most is that for the first 5 minutes (I'm not kidding
here!) nothing
seems to happen.
Very interesting, I haven't seen that behavior before. You might try
stepping through it if you have the source, it might be a bug. I am assuming
you have tested all your mappings and those work correctly?
On Thu, Feb 18, 2010 at 9:00 AM, Marco
irresponsible.philosop...@googlemail.com wrote:
Yeah, it all works fine, the code before and after is executed well
and the
mappings are ok. I use NHibernate throughout the complete application,
reading and writing data all the time and everything is just fine.
If I don't get this to work I have to find resp. write a workaround,
so I'd better
You have another option if FNH does not support access=readonly.
Ask the feature to FNH team ;)
2010/2/18 Robert Rudduck rob...@rpowered.net
You could set the access to use a private field and not put a setter on the
property. ReadOnly means that any update wont be written out, but it still
I agree it probably would be. However my code is actually called by
DAOs to create a wrapper around them for pagination. This use case is
fairly documented and the documented solutions work EXCEPT in this
scenerio. I'm working on manually constructing the SQL from the
criteria expression right
Yes, I can. But why should I use reflection when NHibernate already
loaded that information? Well I simply want to know which NHibernate's
class contains this info. I dont want alternative ways of doing this.
On Feb 18, 4:46 pm, Robert Rudduck rob...@rpowered.net wrote:
If you just want to do
Hi All!
I have designed I web application. I have user Castle Windsor /
nHibernate/ASP .NET MVC 1.0.
Now I have got another thing. to fix an ADMIN TOOL in a windows
application.
How can I use all the database settings in my web app in the windows
application? I am almost confused.
I know I can
We use one (read-only) session which we disconnect as soon as we
retrieve the data from the database. The data retrieved, often has
lazy-loaded properties which are not initialized yet.
When we try to access the properties, the following exception gets
thrown:
This is the setup for my 2 entities:
public class Person {
public Guid Id {get;set;}
public string Name {get;set;}
}
public class Immortal : Person {
public string DarkName {get;set;}
}
Here's what their mapping looks like:
class name=Person
id name=Id
generator class=guid.comb/
Hi!
I've got two simple classes ClassA and ClassB mapped with table-per-
concrete-class strategy. IssueClass can contain a reference to ClassA
or to ClassB. Here is the mapping file:
?xml version=1.0 encoding=utf-8 ?
hibernate-mapping xmlns=urn:nhibernate-mapping-2.2
assembly=HqlIssue
For my current project, we use a nHibernate session to retrieve the
object, and another session to update the changes we've made to the
object in between the two session. If we use SaveOrUpdate(),
nHibernate will typically do a select-then-update (so, two calls to
the database).
However, our own
Association.class = ..
2010/2/18 Sergey Ishchenko s.a.ishche...@gmail.com
Hi!
I've got two simple classes ClassA and ClassB mapped with table-per-
concrete-class strategy. IssueClass can contain a reference to ClassA
or to ClassB. Here is the mapping file:
?xml version=1.0
sorry... was too short
An any type has the special properties id and class, allowing us to
express a join in the following way (where AuditLog.Item is a property
mapped with any).
from Eg.AuditLog log, Eg.Payment payment
where log.Item.class = 'Eg.Payment, Eg, Version=...' and log.Item.id =
I think this can be resolved by not disconnecting manually. Unless
you're in a transaction, the ISession will automatically release the
DbConnection back to the pool anyway.
/Oskar
2010/2/18 taoufik taoufik.zam...@fortisinvestments.com:
We use one (read-only) session which we disconnect as
It might not suit you at all...
In some use cases in our fat client we use something like this...
aggRoot = fetchUsingSession1();
clonedAgg = aggRoot.Clone();
[...]
aggRoot.Something=changedValue;
[...]
session2.Lock(clonedAgg, lockmode.none);
session2.Merge(aggRoot);
We need to clone the
Interesting to know that the session does a db connection management
itself. Is there a way to demonstrate when the session will
automatically disconnect if not in a transaction?
On Feb 18, 5:26 pm, Oskar Berggren oskar.bergg...@gmail.com wrote:
I think this can be resolved by not disconnecting
It seems that the option you're talking about (called in hibernate:
'connection.release_mode' = 'after_statement') is not supported by
nHibernate. A piece of code from nhibernate source:
private static ConnectionReleaseMode
ParseConnectionReleaseMode(string name)
{
Beat you to it by 12 minutes. And I'm beggining to use your style, too.
I'm worried :-)
Diego
2010/2/17 Fabio Maulo fabioma...@gmail.com
access=readonly
2010/2/17 Alex McMahon fluxmu...@gmail.com
Fabio,
Thanks for your reply... I don't quite understand what you mean... I
think
Not sure about FNH, but using hbm mappings you don't need a setter if you
declare a property with access=readonly.
NH will keep track of the DB value, do dirty checks with it and issue the
appropriate updates to the DB.
Diego
P.S. I'm writing this offline, sorry if somebody already answered
I think the simplest way to implement this (regardless of whether it's right
thing or what reasons make you ask for it) is to map a nullable enum FIELD,
and make a property (that is NOT mapped in NH), which reads and writes the
field value.
something like:
*
*
*//Mapped in NH, nullable
private
I'm excited about the new features coming out in NHibernate 3 and
wanted to know what the anticipated roadmap is for this version and an
anticipated date it will be officially released.
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To post to this
JIRA up again at http://216.121.112.228
we will adjust it to http://jira.nhforge.org/ soon
Thanks to be patient.
2010/2/16 Fabio Maulo fabioma...@gmail.com
Our JIRA will be down for a while.
Be patient.
--
Fabio Maulo
--
Fabio Maulo
--
You received this message because you are
La tua ansia non puó modificare gli eventi ;)
2010/2/18 Paul paulyo...@gmail.com
I'm excited about the new features coming out in NHibernate 3 and
wanted to know what the anticipated roadmap is for this version and an
anticipated date it will be officially released.
--
You received this
Good tip.
btw the mapping should be to the property; for the provided example it look
as:
property name=Column access=camelcase-underscore/
2010/2/18 Mohamed Meligy eng.mel...@gmail.com
I think the simplest way to implement this (regardless of whether it's
right thing or what reasons make you
sorry
access=field.camelcase-underscore
2010/2/18 Fabio Maulo fabioma...@gmail.com
Good tip.
btw the mapping should be to the property; for the provided example it look
as:
property name=Column access=camelcase-underscore/
2010/2/18 Mohamed Meligy eng.mel...@gmail.com
I think the
In my entity class I have the following property:
public virtual IListstring Tags { get; private set; }
In my fluent nhibernate mapping file, I have the following mapping:
HasMany(x = x.Tags)
.Table(ProductTags)
.Element(Tag)
.AsBag();
Which
Nevermind. the problem was in the way that Fluent NHibernate's
PersistenceSpecification test was interacting with the entity. Not
sure what the bug is, but when I save the entity by directly calling
session.Save, it works fine.
On Feb 18, 6:56 pm, JohnRudolfLewis johnrle...@gmail.com wrote:
eh?
2010/2/18 Diego Mijelshon diegosebast...@gmail.com
Beat you to it by 12 minutes. And I'm beggining to use your style, too.
I'm worried :-)
Diego
2010/2/17 Fabio Maulo fabioma...@gmail.com
access=readonly
2010/2/17 Alex McMahon fluxmu...@gmail.com
Fabio,
Thanks for your
48 matches
Mail list logo