About the fact that collections in values are not supported:
1. The first thing I could do is just to ignore them and do not index,
do not allow query. So even if there is no support over there at least
there is no exception thrown, so one could still use the
collections/serializable props and persist them only that are not
indexed
2. I can index the collections very easy but we must decide then how
do we query based on this collection. We can have the same approach we
have with ManyAssociations:
QueryBuilder<Person> qb = qbf.newQueryBuilder( Person.class );
Person person = templateFor( Person.class );
QueryParam queryParam = oneOf(
person.personalWebsite().get().queryParams() );
qb.where(
and(
eq( queryParam.name(), "foo" ),
eq( queryParam.value(), "bar" )
)
);
public interface Person
{
Property<URL> personalWebsite();
}
public interface URL extends ValueComposite
{
Property<Collection<QueryParam>> queryParams();
}
public interface QueryParam extends ValueComposite
{
Property<String> name();
Property<String> value();
}
WDYT?
On Thu, Feb 19, 2009 at 8:24 AM, Rickard Öberg <[email protected]> wrote:
> I've now cleaned up the Value implementation, and also ensured that all
> current testcases work. Some testcases have been removed, such as the
> ones that enforce that values only have properties (which we agreed on
> was not true).
>
> The index/query of values is also working. Main limitation (as far as I
> can tell) is that collections in values are not yet handled. but
> querying of entity->value->value->property works! Veeery cool!
>
> Anything that needs consideration or is it a good enough start for Value
> support?
>
> /Rickard
>
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
>
--
Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://www.codedragons.com - New Energy for Projects - Great People
working on Great Projects at Great Places
Sent from: Amsterdam Nh Netherlands.
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev