Questions tagged [fluent]

Fluent interface is an API which allows method chaining to make code more readable.

Fluent interface is API which allows method chaining to make code more readable.

1148 questions
0
votes
1 answer

Auto save in fluent nhibernate does not work

I have a problem. When I try to insert an object with the type book to the DB, It should add the author also to the authors table if it doesnt exist. Instead I get an error 'unsaved object' and the object has not been saved. whats the problem? the…
user1430430
  • 21
  • 1
  • 6
0
votes
1 answer

EF query to fluent nhibernate query

I have EF Query: IEnumerable accounts = ( from a in dc.Accounts join m in dc.GroupMembers on a.AccountID equals m.AccountID where m.GroupID == GroupID && m.IsApproved select a) …
Shlomi Levi
  • 3,114
  • 1
  • 23
  • 35
0
votes
1 answer

FluentNHibernate - cascade inserting

I have the following code: // setup var sessionFactory = SessionManager.CreateSessionFactory(true); // business using (var session = sessionFactory.OpenSession()) { using (var tran = session.BeginTransaction()) { var user1 =…
Ruslan
  • 2,678
  • 3
  • 22
  • 25
0
votes
1 answer

Primary key as foreign key throws duplicate definition exception

I'm using Enterprise Framework 4.3.1 with its Fluent API to set up my entities mapping to an existing database. I have a very special case with a associative table which has it's primary key to be, at the same time, two foreign keys of their parent…
Alpha
  • 7,586
  • 8
  • 59
  • 92
0
votes
1 answer

Fluent NHibernate automapping table per hierarchy: can I split a hierarchy?

I have a rather large class hierarchy that I'd like to use table per hierarchy with, but with a slight twist. My hierarchy looks like: Event --> [specific_events] --> Transaction --> [specific_transactions] I'd like to split this hierarchy into…
Brian
  • 1,027
  • 2
  • 11
  • 17
-1
votes
2 answers

c# nhibernate fluent mysql

See more: MySQLStored Hi to all. I have a proyect with c#+nhibernate+fluent+mysql I don't understand why i have to map the tables in hbm xml file, when this information is in database, but this is other discussions. My proyect contains this file hbm…
-1
votes
1 answer

All of my API calls are just repeated code, is it possible to create an API client that uses a Fluent Interface in PHP?

I'm consuming a SOAP API and every method I create is the same except for a single string, which matches the name of the function, and the arguments. I feel like it's a great candidate for a Fluent interface. How would I go about making this in PHP…
Bradley
  • 1
  • 1
  • 3
-1
votes
2 answers

How can i use custom attribute my c# project

i want use custom attribute on my n-tier project. for -Caching- -Logging -Validation -Exception
-1
votes
1 answer

Use of fluent interfaces to validate objects using java 8

Im currently doing a side project to validate objects using java 8. Currently I have this: An interface that is essencially a rewrite of the java 8 predicate interface: Then, I created the implementation of that same interface: And then this…
pedro
  • 7
  • 1
  • 4
-1
votes
1 answer

Type Erasure and the Return type

class Person { String name; String add; Person(){} @Override public String toString() { return "Person{" + "name='" + name + '\'' + ", add='" + add + '\'' + '}'; } …
Kamal Dua
  • 11
  • 3
-1
votes
2 answers

Colon ':' in column error - Not all named parameters have been set in Nhibernate?

I have a table with columns that have colons within. I am trying to figure out a way to ignore the colon as a parameter when trying to query the DB. I have tried to use SetParameter and String.Format but it does not work. I have also tried to escape…
TheProgrammer
  • 1,314
  • 5
  • 22
  • 44
-1
votes
1 answer

In fluentd how to parse logs and create fields based on key values

In fluentd how do i parse this log and get fields like ip, method and severity by using grok pattern or json {"log":"2019-08-09 06:54:36,774 INFO 10.2.1.200 [09/Aug/2019:06:54:36 +0000] \"GET / HTTP/1.1\" 200 205 \"-\"…
S Mohan
  • 257
  • 4
  • 14
-1
votes
1 answer

How type parameters are passed to next method

Given the following method-chain: modelBuilder .Entity() .HasOne(s => s.Address) .WithOne(ad => ad.Student); How does HasOne know about the Student type (shown in lambda argument) provided by its…
chakmeshma
  • 246
  • 8
  • 27
-1
votes
1 answer

Adding multiple action statements in drools fluent api

I am using fluent api to generate rules. I have a requirement to do multiple actions when a specific condition is satisfied. I can add multiple constraints in lhs. I need to know how I can add multiple rhs statements. PackageDescrBuilder…
Sathish Kumar
  • 189
  • 1
  • 2
  • 14
-1
votes
1 answer

specific data result from query

I'm having problems to group my sql query by estacion.id, $result = \DB::table('estacion') ->select('estacion.id as id_est','estacion.nombre as nombre_estacion','eq.id as id_equipo', 'eq.nombre as nombre_equipo','pa.nombre…
1 2 3
76
77