I have gotten so far that I understand entity objects have an ID while value object have not, but in the most common example you have the person entity that have a address value object attached to it. What is the big advantage of creating a separate address object instead of just keeping the address properties within the Person Entity?
...
Are there any tools available for transforming types defined in an xsd schema (may or may not include other xsd files) into ActionScript value objects? I've been googling this for a while but can't seem to find any tools and I'm pondering wether writing such a tool would save us more time right now than to simply code our value objects b...
I haven't really seen any examples, but I assume that they are saved inside the containing entity table within the database.
Ie. If I have a Person entity/aggregate root and a corresponding Person table, if it had a Value Object called Address, Address values would be saved inside this Person table!
Does that make sense for a domain wh...
I have a person entity containing an Address as a value object:
public Person()
{
WithTable("Person");
Id(x => x.Id);
Component<Address>(x => x.Address, a =>
{
a.Map(x => x.Address1);
a.Map(x => x.Address2);
a.Map(x => x.Address3);
a.Map(x => x.Town);
a.Map(x => x.Postcode);
});
}
It states...
I'm a rusty programmer attempting to become learned in the field again. I've discovered, fitfully, that my self-taught and formal education both induced some bad habits. As such, I'm trying to get my mind around good design patterns, and -- by extension -- when they're wrong. The language is Java, and here's my issue:
I'm attempting to ...
Value objects got no identity. ORM needs identity to update database.
How to trick ORM?
(marking Id for value object as internal won't work, cause ORM lives in different assembly and moving it to the same assembly is not acceptable).
Thanks in advance.
...
Hello, I'm new to DDD and NHibernate.
In my current project, I have an entity Person, that contains a value object, let's say Address. Today, this is fine. But maybe one day I will have a requirement that my value object (in this case Address), will have to become an entity.
Before trying to model this on a DDD-way, in a more data-cent...
Curious if anybody has considered using EnumMap in place of Java beans, particularly "value objects" (with no behavior)? To me it seems that one advantage would be that the name of a "property" would be directly accessible from the backing Enum, with no need for reflection, and therefore I'd assume it would be faster.
...
I'm developing a module based applications in Flex and I was thinking about moving all my Value Objects (VOs) into a library project and I was wondering if any thinks this is a bad idea or have any alternative suggestions.
Current Structure:
I have a project that consist of a shell application and 3 modules. The modules contain about 1...
Hey everyone,
I'm trying to design a pretty simple app and am getting myself a bit confused with Hibernate's definition of entity and value objects (as defined in Chapter 4 of Java Persistence with Hibernate).
What I have is an app with customers, who can place orders (one to many relationship). Each of these orders has many order line...
I'm new to Java and I have to create a value object, (maybe it's called mapped object in Java) but my code doesn't seem to work, here is the value object:
package ....;
public class User {
private int id;
private int uid;
private String name;
public User()
{
// do something here
}
}
and I assi...
Entities and value objects are both domain objects. What's the use of knowing the distinction between the two in DDD? Eg does thinking about domain objects as being either an entity or value object foster a cleaner domain model?
...
I'm not well versed in domain driven design and I've recently started created a domain model for a project. I still haven't decided on an ORM (though I will likely go with NHibernate) and I am currently trying to ensure that my Value Objects should be just that.
I have a few VOs that have almost no behavior other than to encapsulate "li...
context:
I have an entity Book. A book can have one or more Descriptions. Descriptions are value objects.
problem:
A description can be more specific than another description. Eg if a description contains the content of the book and how the cover looks it is more specific than a description that only discusses how the cover looks. I don...
is it acceptable/good-practice to use the method chaining pattern on value objects (like, returning a new object instead of this)? are there cases out there where this solution is implemented ?
I cannot think of any drawbacks, but I'd like to hear your point.
...
Hello!
I have some small problem in understanding Value Objects in Flex... I'm trying to get some data from PHP/MySQL and send it to Flex but I'm stuck in some (obviously) basic problems...
Let's say That my object in Flex would look like this:
package some.package.VO {
[RemoteClass(alias="VOPerson")]
[Bindable]
public...
I don't understand what is structurally different between a Value Object and a Class in ActionScript3.
Can any Class be a VO if you decide to call it one?
Thanks.
...
(This question uses PHP as context but isn't restricted to PHP only. e.g. Any language with built in hash is also relevant)
Let's look at this example (PHP):
function makeAFredUsingAssoc()
{
return array(
'id'=>1337,
'height'=>137,
'name'=>"Green Fred");
}
Versus:
class Fred
{
public $id;
public $...
I have class called 'Tool'. Tool has properties like: Name, Description and some specific others. Tool is special because Name and others are read only but description can be modified by users.
Count of tools is constant and known at development time. It is not Value Object because I need to query them and show to users where they can u...
Since there isn't respositories for value objects. How can I load all value objects?
Suppose we are modeling a blog application and we have this classes:
Post (Entity)
Comment (Value object)
Tag (Value object)
PostsRespository (Respository)
I Know that when I save a new post, its tags are saving with it in the same table. But how c...