-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Question of properties in H3 final
PostPosted: Mon Apr 11, 2005 10:37 pm 
Newbie

Joined: Sun Feb 27, 2005 5:00 am
Posts: 6
Location: shanghai, china
<id name="objectId" type="string" unsaved-value="null">
<column name="OBJECTID" not-null="true" sql-type="varchar(32)"/>
<generator class="uuid.hex"/>
</id>
<properties name="unique" unique="true">
<many-to-one cascade="none" class="ipnet.core.server.model.CoreObject" name="parentObject">
<column name="PARENT_OBJECTID" not-null="true" sql-type="varchar(32)"/>
</many-to-one>
<many-to-one cascade="none" class="ipnet.core.server.model.CoreObject" name="childObject">
<column name="CHILD_OBJECTID" not-null="true" sql-type="varchar(32)"/>
</many-to-one>
</properties>
<property name="parentTreeName">
<column name="PARENT_TREE_NAME" not-null="true" sql-type="varchar(512)"/>
</property>
<property name="childTreeName">
<column name="CHILD_TREE_NAME" not-null="true" sql-type="varchar(512)"/>
</property>

Hql "delete CoreVerticalObject where childTreeName=:childTreeName"
work well

but neither "delete CoreVerticalObject where parentObject=:parentObject"
nor "delete CoreVerticalObject where unique.parentObject=:parentObject"
can work.

and another question, if use "select" clause, you must use:
"select cvObject CoreVerticalObject as cvObject where cvObject.unique.parentObject=:parentObject"
why not is:
"select cvObject CoreVerticalObject as cvObject where cvObject.parentObject=:parentObject"
I think that later is easy to use and understand

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 11:21 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
lol, two posts below yours...

http://forum.hibernate.org/viewtopic.php?t=940248


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 12, 2005 12:32 am 
Newbie

Joined: Sun Feb 27, 2005 5:00 am
Posts: 6
Location: shanghai, china
in Topic: a question about Hibernate 3

Quote:
Using the PK class attribute directly on the entity class however as follows:

"update <EntityName> set <bla-bla-bla> where attribute = :someValue".

, it worked.


but "delete CoreVerticalObject where parentObject=:parentObject"
does not work, so i open this post!

thanks for your reply!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.