Re: Behavior of ODMG personality and many-to-many relationships and default cache implementation

2004-04-06 Thread Sean Dockery
Still no takers?  :-(

Sean Dockery wrote:

No takers?

Sean Dockery wrote:

Consider the following classes that represent a many-to-many 
relationship:

public class Category {

private Collection products;

public Collection getProducts() {
return products;
}
public void setProducts(Collection newProducts) {
products = newProducts;
}
}

public class Products {

private Collection categories;

public Collection getCategories() {
return categories;
}
public void setCategories(Collection newCategories) {
categories = newCategories;
}
}

If I have categories A and B, and products X and Y.  Initially 
category A contains only product X, and category B contains only 
product Y.

If I have fetched category A into the cache, then load product Y, and 
modify it thusly...

productY.getCategories().add(categoryA);

...and save it, the correct record is inserted into the indirection 
table describing the relationship between categoryA and productY. 
However, the cached copy of A is not updated with the new 
relationship.  If categoryA is purged from the cache and 
re-materialized, it contains both X and Y in its products collection.

Is this correct behavior or is this a bug?  If it is a bug, will it be 
fixed before 1.0 final is released?

Thanks...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Behavior of ODMG personality and many-to-many relationships and default cache implementation

2004-04-02 Thread Sean Dockery
No takers?

Sean Dockery wrote:

Consider the following classes that represent a many-to-many relationship:

public class Category {

private Collection products;

public Collection getProducts() {
return products;
}
public void setProducts(Collection newProducts) {
products = newProducts;
}
}

public class Products {

private Collection categories;

public Collection getCategories() {
return categories;
}
public void setCategories(Collection newCategories) {
categories = newCategories;
}
}

If I have categories A and B, and products X and Y.  Initially category 
A contains only product X, and category B contains only product Y.

If I have fetched category A into the cache, then load product Y, and 
modify it thusly...

productY.getCategories().add(categoryA);

...and save it, the correct record is inserted into the indirection 
table describing the relationship between categoryA and productY. 
However, the cached copy of A is not updated with the new relationship. 
 If categoryA is purged from the cache and re-materialized, it contains 
both X and Y in its products collection.

Is this correct behavior or is this a bug?  If it is a bug, will it be 
fixed before 1.0 final is released?

Thanks...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Behavior of ODMG personality and many-to-many relationships and default cache implementation

2004-04-02 Thread Sean Dockery
No takers?

Sean Dockery wrote:

Consider the following classes that represent a many-to-many relationship:

public class Category {

private Collection products;

public Collection getProducts() {
return products;
}
public void setProducts(Collection newProducts) {
products = newProducts;
}
}

public class Products {

private Collection categories;

public Collection getCategories() {
return categories;
}
public void setCategories(Collection newCategories) {
categories = newCategories;
}
}

If I have categories A and B, and products X and Y.  Initially category 
A contains only product X, and category B contains only product Y.

If I have fetched category A into the cache, then load product Y, and 
modify it thusly...

productY.getCategories().add(categoryA);

...and save it, the correct record is inserted into the indirection 
table describing the relationship between categoryA and productY. 
However, the cached copy of A is not updated with the new relationship. 
 If categoryA is purged from the cache and re-materialized, it contains 
both X and Y in its products collection.

Is this correct behavior or is this a bug?  If it is a bug, will it be 
fixed before 1.0 final is released?

Thanks...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Behavior of ODMG personality and many-to-many relationships and default cache implementation

2004-03-31 Thread Sean Dockery
Consider the following classes that represent a many-to-many relationship:

public class Category {

	private Collection products;

public Collection getProducts() {
return products;
}
public void setProducts(Collection newProducts) {
products = newProducts;
}
}

public class Products {

	private Collection categories;

public Collection getCategories() {
return categories;
}
public void setCategories(Collection newCategories) {
categories = newCategories;
}
}

If I have categories A and B, and products X and Y.  Initially category 
A contains only product X, and category B contains only product Y.

If I have fetched category A into the cache, then load product Y, and 
modify it thusly...

productY.getCategories().add(categoryA);

...and save it, the correct record is inserted into the indirection 
table describing the relationship between categoryA and productY. 
However, the cached copy of A is not updated with the new relationship. 
 If categoryA is purged from the cache and re-materialized, it contains 
both X and Y in its products collection.

Is this correct behavior or is this a bug?  If it is a bug, will it be 
fixed before 1.0 final is released?

Thanks...



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]