Hi all,
Is it possible to delete persistent objects graph by the single command using WCF Data Services in Silverlight?
I've started with this walkthrough and added code for deletion of selected order (which contains details):
private void deleteOrder_Click(object sender, RoutedEventArgs e)
{
Order deletedOrder = (Order)ordersGrid....
I have trouble explaining to people who are new to CSS how the cascade works when using stylesheets. For whatever reason, newbies seem to naturally start out by just adding a class to every element. Take the code snippet from this question, for instance (no offense to the OP, overtherainbow).
Doing this: ul#nav { } and ul#nav li ...
I'm using symfony 1.4 and doctrine. I've spent the last couple days playing with my schema, and I've gotten it to load up / build / behave properly but only on my local machine. When I copy the files to an account on Dreamhost, change the configuration to allow a connection to that database (and nothing else) I get the following error tr...
Hi,
Maybe this is sort of a naive question...but I think that we should always have cascading deletes and updates. But I wanted to know are there problems with it and when should we should not do it? I really can't think of a case right now where you would not want to do an cascade delete but I am sure there is one...but what about up...
Hello.
I have a database in which an entity (say, User) has a list of entities (say, List). As a requirement, I must have a denormalized count of the entities on the list:
@Entity
class User {
/* ... */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<Friendship> friends;
public int friendsCou...
In hibernate, there are many information about set cascade to "all, delete" and so on,
but I want to know the effect of set cascade to "none"
now I have a class Parent, and it's child-class Child,
class Parent{
List<Child> childs;
....}
and in the file parent.hbm.xml(I omitted other content)
<class name="Parent" table="parent" ...
Been messing around with Hibernate and PostgreSQL trying to get it to work as expected.
But for some reason when I try to persist an object with a @OneToMany relationship with more than one item in the set all but the first item seem to be ignored. I've tried this via local and remote interfaces but get the same results each time. No ex...
In mysql, I've got the following:
TABLE docs (
ID
title
content
)
TABLE specialDocs (
docID -> docs(ID)
userID -> users(ID)
)
So specialDocs is a subset of documents that can belong to users.
I am wondering: Is it possible to specify a cascade rule so that when a user is deleted, the docs that belong to that use...
how to use cascade and inverse in hibernate,
what is the procedure/tag to define them?
is they relate to each other?
how they are useful in hibernate...
...
I have a User and a set of Authorities in a one-to-many relationship:
User.hbm.xml:
<set name="authorities" table="authorities" cascade="all-delete-orphan">
<key column="user_id" />
<one-to-many class="com.ebisent.domain.Authority" />
</set>
When I delete a user, I want to delete the authorities as well, but what is happening...
Hello,
This may seem like a very simple question, but I have been struggling with it for a while. I have two entities Client and User where Client is a parent of User. The entities are annotated as follows:
Client:
@OneToMany(mappedBy = "client", fetch = FetchType.LAZY)
@Cascade({CascadeType.SAVE_UPDATE, CascadeType.DELETE})
...
How does one make Zend Db cascade delete multiple levels of the hierarchy? For example:
dealers -> products -> attributes
deleting one dealer should go all the way down to attributes, and now it doesn't :(
Any thoughts?
...
I am making a website where users can post 'Posts' and then users can 'Comment' on these posts. I have a database with 3 tables. One contains User Information, one contains Post Information and the final one contains Comment Information.
I want to set up rules so that if a User is deleted, all of their posts and comments are deleted, an...
Hi,
do grails events like beforeInsert or afterInsert get invoked on cascaded saves? I wrote an integration test and i find that the events are getting invoked on an explict save and not on cacaded saves. Is there any way i can invoke the event on a cascaded save?
...
I have three classes:
Login
Role
LoginsInRoles
Login is one-many to LoginsInRoles and Role is one-many to LoginsInRoles. This is not a traditional many-many relationship because LoginsInRoles has to be a first class entity because it has additional properties that are unique to it.
I have set the cascade to delete for login and rol...
Hello, I have a piece of code that 'updates' an entry in the database by first cascade deleting it, and then replacing it with a new object, because I had a lot of problems trying to update it normally. This hack worked fine, until I started using some ManyToMany relations. This is the relation that is giving problems:
@ManyToMany(casca...